title: R: plm -- year fixed effects -- year and quarter data
body: <p>I am having a problem setting up a panel data model.</p>
  
  <p>Here is some sample data:</p>
  
  <pre><code>library(plm)
  
  id &lt;- c(1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2)
  year &lt;- c(1999,1999,1999,1999,2000,2000,2000,2000,1999,1999,1999,1999,2000,2000,2000,2000)
  qtr &lt;- c(1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4)
  y &lt;- rnorm(16, mean=0, sd=1)
  x &lt;- rnorm(16, mean=0, sd=1)
  
  data &lt;- data.frame(id=id,year=year,qtr=qtr,y_q=paste(year,qtr,sep="_"),y=y,x=x)
  </code></pre>
  
  <p>I run the following regression using 'id' as the individual index and 'year' as the time index:</p>
  
  <pre><code>reg1 &lt;- plm(y ~ x, data=data,index=c("id", "year"), model="within",effect="time")
  </code></pre>
  
  <p>Unfortunately, I get the following error:</p>
  
  <blockquote>
    <p>duplicate couples (time-id)   Error in pdim.default(index[[1]], index[[2]]) : </p>
  </blockquote>
  
  <p>So to get around that, I use the combined variable that is 'y_q':</p>
  
  <pre><code>reg1 &lt;- plm(y ~ x, data=data,index=c("id", "y_q"), model="within",effect="time")
  </code></pre>
  
  <p>But here's my issue -- I only want to have year fixed effects and not year-quarter.</p>
  
  <p>Is there another way to get around the earlier issue instead of making the tiem index 'y_q'?</p>
  
  <p>Thanks ahead of time for any help!</p>