0
votes

I've performed a multiple linear regression on a large data set using

m1 <- lm(y ~ x + x1 + x2..., dataset)

added standardised beta coefficients using lm.beta

m1_stnd <- lm.beta(m1)

and tabulated the results using stargazer

library(stargazer)
stargazer(m1, m1_stnd, coef = list(m1$coefficients,m1_stnd$standardized.coefficients), 
type = "text", digits = 3, covariate labels = c("labels", "labels2", "labels3",...), 
title = "Title", out = "m1_reg.htm")

The output gives me two columns of coefficients, however, the significance values are different for some of them, with the unstandardized often significant when the standardized are not

               Unstandardized     Standardized
Gender (Male)      -0.125***          -0.010
                   (0.048)            (0.048)

The answer to this post : Including standardized coefficients in a stargazer table shows the same thing for the constant only (they don't comment on it), whereas I have it for many of my variables.

Why would this happen, is it an error in my code or is it statistically valid? I don't see how standardizing should change the significance.

Thank you!

1

1 Answers

0
votes

Stargazer is using the unstandardised coefficients to determine the significance of the standardised, because you have not told it otherwise. You need to add in another line detailing which p values to use:

p = list (coef(summary(m1))[,4], coef(summary(m1))[,4]):

The complete method call would look like:

stargazer(m1, m1_stnd, coef = list(m1$coefficients, m1_stnd$standardized.coefficients),
p = list (coef(summary(m1))[,4], coef(summary(m1))[,4]), 
type = "text",
digits = 3,
covariate labels = c("labels", "labels2", "labels3",...),
title = "Title",
out = "m1_reg.htm")