Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Stargazer producing various latex errors

$
0
0

I am using stargazer to output regression results from r to latex. When I run the output in latex I see the results, but get many Package array errors. Here is my code. In R I use stargazer as follows:

stargazer(fe1, fe2, fe3,
               title="Between regression",
               align=TRUE, 
               df = FALSE, 
               dep.var.labels=c('depLabel'), 
               covariate.labels = c('1st', '2nd', '3rd', '4th') )

This produces many errors in latexthat look like:

Package array Error: Illegal pream-token (D): `c' used. ...5pt}}lD{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} }
Package array Error: Illegal pream-token (.): `c' used. ...5pt}}lD{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} }
Package array Error: Illegal pream-token (-3): `c' used. ...5pt}}lD{.}{.}{-3} D{.}{.}{-3} D{.}{.}{-3} }

and also many Missing $ inserted errors. Is there perhaps any package I need to add to my latex preamble? Or any other common workaround?

Edit Here are the last lines of the dput of fe1:

"31495", "31496", "31497", "31498", "31499", "31500"), class = c("pindex", 
"data.frame"))), assign = c(0L, 1L, 1L), args = structure(list(
    model = "within", effect = "time", random.method = "swar", 
    random.dfcor = NULL, inst.method = "bvk"), .Names = c("model", 
"effect", "random.method", "random.dfcor", "inst.method")), aliased = structure(c(FALSE, 
FALSE), .Names = c("X1Dq", "X1DT")), call = plm(formula = Y1 ~ 
    X1, data = pdata1, effect = "time", model = "within")), .Names = c("coefficients", 
"vcov", "residuals", "df.residual", "formula", "model", "assign", 
"args", "aliased", "call"), class = c("plm", "panelmodel"))

Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>