title: How to get fixed effects in an FE model in R
body: <p>In an equation as such:</p>
  
  <p><strong><em>log(Pis)=B0+B1log(X1)+B2log(X2)+B3(X3)+e</em></strong></p>
  
  <p>for firms i across 25 periods from s=1 to s=25 (panel data).</p>
  
  <p>The output in R for fixed effects only gives me estimates for <strong>X1</strong>, <strong>X2</strong>, and <strong>X3</strong> (all time-varying variables naturally). How do I get the fixed effects?</p>
  
  <p>These are my commands:</p>
  
  <pre><code>Y &lt;- cbind(P)
  X &lt;- cbind(X1,X2,X3)
  pdata &lt;- plm.data(mydata, index=c("i","s"))
  between &lt;- plm(Y ~ X, data=pdata, model="between")
  summary(between)
  fd &lt;- plm(Y ~ X, data=pdata, model="fd")
  summary(fd)
  fixed &lt;- plm(Y ~ X, data=pdata, model="within")
  summary(fixed)
  </code></pre>
  
  <p>As mentioned before, the summary for the <strong>fixed</strong> command only gives me estimates for $X1$, $X2$, and $X3$. The summary of <strong>fd</strong>, which is <em>Oneway (individual) effect First-Difference Model</em>, gives me an intercept. I also get an intercept for <strong>between</strong> (that is <em>Oneway (individual) effect Between Model</em> in plm).</p>