Collapse & contract
There are a number of so called postestimation commands that use the results of your regression to perform various actions (e.g. saving your regression results, calculating additional statisticts , performing further hypothesis tests etc.).
See help regress_postestimation
* Post-estimation commands
webuse nhanes2, clear
reg bmi age female i.region
// Information criteria
estat ic
// To test for heteroskedasticity (Breusch-Pagan test) you can use:
estat hettest
// To test additional hypotheses about your coefficients, you can use the command test
test _b[age] = 1 // tests if the coefficient of age is 1
test age = female // tests if the the coefficients of age and female are equal
// Predict fitted values
reg bmi age female i.region
predict y_hat
// Note that predict calculates fitted values for all observations, even those not included in the model (out-of-sample prediction)
reg bmi age female i.region if bmi < 50
predict y_hat_new
count
count if y_hat_new!=.
// Add residuals
reg bmi age female i.region
predict residuals, resid
graph twoway (scatter bmi residuals) (lfit bmi residuals)