// in regression, the se of the slope depends upon // both the sd of y and the sd of x // If x is measured over an expanded range, and y // has a homogeneous variance (as assumed by // regression), then the sd of x increases and // the se of the slope should decrease. // (The sd of the intercept, which here is the // also the mean, is in this case constant, and // is just the RMSE.) clear all set obs 101 generate x = (_n-51)/10 // x = -5(0.1)5 generate ru = rnormal() generate y = x + ru // y = 0 + 1*x + e, e~N(0,1) quietly summarize x scalar xsd = r(sd) regress y x estimates store orig // relate coefficient standard errors to the RMSE display _se[x]*sqrt(100)*xsd display _se[_cons]*sqrt(101) generate x1 = x*2 // double the x range quietly summarize x1 scalar x1sd = r(sd) generate y1 = x1 + ru // but leave the error unchanged regress y1 x1 estimates store doubled display _se[x1]*sqrt(100)*x1sd display _se[_cons]*sqrt(101) // this is not quite the same as simply rescaling x replace x = x*2 regress y x estimates table orig doubled ., se stats(r2) // the effect on the se of the slope is the same, but the // slope itself is not // (again, because our constant/intercept happens to be // the mean in these examples, it is unaffected.) replace x = x*2 // double again quietly summarize x scalar xsd = r(sd) replace y = x + ru regress y x display _se[x]*sqrt(100)*xsd display _se[_cons]*sqrt(101) estimates table orig doubled ., se stats(r2)