clear set more off ******* * type "help log" in the command window to see help on command log * log using mystatasession.txt, replace * * the previous line can be used to save a log in an interactive session ****** drawnorm x y, n(100) describe summarize list x scatter y x gen dep=2*x+y^2 scatter dep x ******* * not the kind of heteroskedasticity i want * generate another variable ******* * gen dep=2*x+y*exp(x) * this generate an error! ******* * first must drop, then can replace ******* drop dep gen dep=2*x+y*exp(x) scatter dep x ******* * clear heteroskedasticity! ******* regress dep x twoway (lfitci dep x) (scatter dep x) hettest ******* * heteroskedasticity test: strongly reject H0 * type "help hettest" in the command window to see help on command hettest ******* rvfplot * log close