I have just started using the stargazer package in R to automate the creation of tables. I expected that if I create a simple regression model and I feed that into the stargazer package, I should expect to observe the coefficients from the model and the p-values that I obtain from the summary() function.
mod = lm(mtcars$mpg~mtcars$cyl+mtcars$disp)
summary(mod)
Produces:
And then feeding this into stargazer:
stargazer(mod,p.auto = FALSE,
align=TRUE, no.space = TRUE, out = "./mtcars.htm", type = 'html')
Produces:
This looks fine. However, what I want is to instead report the standardized coefficients instead of the non-standardized ones. I have used this function "lm.beta" to achieve this:
mod_std = lm.beta(mod)
stargazer(mod_std,p.auto = FALSE,
align=TRUE, no.space = TRUE, out = "./mtcars.htm", type = 'html')
Hoping that now stargazer will use the standardized coefficients. The output I get is:
This is strange, because it looks like the significance level changed. Which should not be the case. And still, the unstandardized coefficients are reported. Any ideas on how I could make the package report the standardized coefficients instead?