title: Stargazer error with plm
body: <p>I obtain an error when using <a href="https://cran.r-project.org/web/packages/stargazer/index.html" rel="noreferrer">stargazer</a> in conjunction with <a href="https://cran.r-project.org/web/packages/plm/index.html" rel="noreferrer">plm</a>. Everything works fine for ordinary linear models. Here's an example:</p>
  
  <pre><code>library(plm)
  library(stargazer)
  
  # create test data
  dat &lt;- data.frame(y=runif(1000),
                    x1=runif(1000),
                    id=rep(1:50, each=20),
                    time=rep(1:20, times=50))
  pdat &lt;- pdata.frame(dat, index=c("id", "time"))
  
  # estimate linear model
  lm_1 &lt;- lm(y~x1, data = pdat) 
  summary(lm_1)
  stargazer(lm_1, type="text", keep.stat = c("n"))
  
  # estimate fixed effects model
  plm_1 &lt;- plm(y ~ x1, data=pdat, model = "within", effect = "individual")
  summary(plm_1)
  stargazer(plm_1, type="text", keep.stat = c("n"))
  </code></pre>
  
  <p>The last call returns     </p>
  
  <pre><code>stargazer(plm_1, type="text", keep.stat = c("n"))
  Error in UseMethod("logLik") : 
    no applicable method for 'logLik' applied to an object of class "c('plm', 'panelmodel')"
  </code></pre>
  
  <p>Thanks!</p>