The formula to calculate beta is: b*(s_x)/s_y)
After running the following code
We see that for x = wage:
b = .0017124
sd_x = 5.755523
sd_y = 0.4304825
However, this is clearly wrong. -reg, beta- says the actual standardized coefficient is .1460648. What am I missing? I think the issue is differences in SD calculation for binary? For instance, these don't match:
After running the following code
Code:
sysuse nlsw88, clear sum union wage reg union wage hours, beta
b = .0017124
sd_x = 5.755523
sd_y = 0.4304825
Code:
. di (.0150858)*(5.755523/.4304825) .20169616
Code:
. di sqrt(.2454739*(1-.2454739)/1878) .00993098 . sum union Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- union | 1,878 .2454739 .4304825 0 1
Comment