简体   繁体   English

Stargazer 中标准化/非标准化系数的不同意义

[英]Different Significance in Stargazer for Standardised/Unstandardised Coefficients

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使用 lm.beta 添加标准化 beta 系数

m1_stnd <- lm.beta(m1)

and tabulated the results using stargazer并使用 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 output 给了我两列系数,但是,其中一些的显着性值不同,当标准化不标准化时,非标准化通常显着

               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!谢谢!

Stargazer is using the unstandardised coefficients to determine the significance of the standardised, because you have not told it otherwise. Stargazer正在使用未标准化的系数来确定标准化的重要性,因为您没有另外说明。 You need to add in another line detailing which p values to use: 您需要添加另一行,详细说明要使用的p值:

p = list (coef(summary(m1))[,4], coef(summary(m1))[,4]) : 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")

Yes, you need to add in another line detailing which p values to use as already suggested.是的,您需要添加另一行,详细说明要使用的 p 值,如已建议的那样。 But, the correct column is 5, not 4 (the 4th column in lm.beta summary is t value), thus:但是,正确的列是 5,而不是 4(lm.beta 摘要中的第 4 列是 t 值),因此:

p = list (coef(summary(m1))[,5], coef(summary(m1))[,5])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM