drop _all capture log close capture log using linear2.log, replace use nhanesrh2 * look only at adults drop if age < 18 sum sbp // more *************************************** * ANALYSIS PLAN * Y = sbp * Key IndVars = age & female * Covariates = educ3 bmi dm *************************************** // more global all "sbp age female educ3 bmi dm" global x "age female i.educ3 bmi dm" global x2 "age i.educ3 bmi dm" // more * Full Model (Age & Sex plus all covariates) xi: reg sbp $x, beta // more * Reformat command reformat // more * * Posterior Predictions using the predict & adjust commands * // more xi: reg sbp $x predict yhat if e(sample) sum sbp yhat // more list age female yhat sbp in 1/10 // more rvfplot, yline(0) // more hettest // more rvpplot bmi // more predict d, cooksd li yhat sbp d if d > 5/_N & d~=. // more sum d, detail // more gen id = _n avplot bmi, mlabel(id) // more avplots // more