*cd "C:\Users\Doug\Desktop\RegressionReviewStata" clear all import delimited "acs2019.csv" regress wage age weekly_hours weeks_worked estimates store wagemodel rvfplot predict yhat predict res, resid * twoway (scatter res yhat), addplot(lowess res yhat) rvfplot, addplot(lowess res yhat, lcolor("yellow")) avplots acprplot age acprplot weekly_hours acprplot weeks_worked estat hettest estat hettest, rhs mtest(holm) gen lwage = log(wage) if wage != 0 regress lwage age weekly_hours weeks_worked estimates store lwagemodel predict resln, resid rvfplot avplots qnorm res qnorm res if lwage != ., name(wage) qnorm resln, name(lwage) sfrancia res sfrancia resln estimates restore wagemodel estat ovtest estat ovtest, rhs estimates restore lwagemodel estat ovtest estat ovtest, rhs dfbeta /* regress wage c.age##c.age weekly_hours weeks_worked estimates store age_sq rvfplot avplots regress lwage c.age##c.age weekly_hours weeks_worked estimates store l_age_sq