UNIVERSITY OF CALIFORNIA, LOS ANGELES
Department of Economics
Economics 143 (Cameron) - Applied Regression
Analysis
SHAZAM code [accountg.sha]
* program to generate an approximate accounting identity between
* the variable y and the constituent variables x z w v (with a
* small error due to "rounding" or "measurement"
sample 1 100
sig:0.1
proc makedata
genr x=6+uni(5)
genr z=3+uni(12)
genr w=8+uni(3)
genr v=3+uni(16)
genr y=x+z+w+v+nor([sig])
ols y x z w v
test x=1
test z=1
test w=1
test v=1
procend
* before you regress y on x,z,w, and v, predict the
* expected value of the coefficients on each of the
* "explanatory" variables
pause
* now run the procedure and see what happens
exec makedata
* if you like, change sig to a larger number and see
* what is the effect when you execute makedata again...
* for example, try sig:1, and then sig:10. What happens?
Updated: 11/30/98; Prepared by: Trudy Ann Cameron; Site Index