Read The Fine Manual, Stephen Ch.
Scroll down to Estimation commands in the documentation to find a list of supported commands.

mark valid markout valid x1 x2 x3 x4 x5 foreach y in y1 y2 { local indvars foreach var in x1 x2 x3 x4 x5 { local indvars `indvars' `var' display "Model: `y' `indvars' reg `y' `indvars' if valid } }
mark valid markout valid y1 y2 x1 x2 x3 x4 x5 foreach y in y1 y2 { local indvars foreach var in x1 x2 x3 x4 x5 { local indvars `indvars' `var' display "Model: `y' `indvars' reg `y' `indvars' if valid } }
mark valid markout valid x1 x2 x3 x4 x5 foreach y in y1 y2 { local indvars foreach var in x1 x2 x3 x4 x5 { local indvars `indvars' `var' display "Model: `y' `indvars' reg `y' `indvars' if valid } }
mark valid markout valid y1 y2 x1 x2 x3 x4 x5 foreach y in y1 y2 { local indvars foreach var in x1 x2 x3 x4 x5 { local indvars `indvars' `var' display "Model: `y' `indvars' reg `y' `indvars' if valid } }
mark valid markout valid x1 x2 x3 x4 x5 foreach y in y1 y2 { local indvars foreach var in x1 x2 x3 x4 x5 { local indvars `indvars' `var' display "Model: `y' `indvars' reg `y' `indvars' if valid } }
mark valid markout valid y1 y2 x1 x2 x3 x4 x5 foreach y in y1 y2 { local indvars foreach var in x1 x2 x3 x4 x5 { local indvars `indvars' `var' display "Model: `y' `indvars' reg `y' `indvars' if valid } }
local predvars x1 x2 x3 x4 x5 x6 x7 x8 x9 // experiment with the list of predictor variables here local n_preds : word count `predvars' mark valid markout valid `predvars' count if valid if r(N) < `n_preds' + 1 { di as err "N = `r(N)' are too few cases for `n_preds' predictors: `predvars'" drop valid exit }
local predvars x1 x2 x3 x4 x5 x6 x7 x8 x9 // experiment with the list of predictor variables here local n_preds : word count `predvars' mark valid markout valid `predvars' count if valid if r(N) < `n_preds' + 1 { di as err "N = `r(N)' are too few cases for `n_preds' predictors: `predvars'" drop valid exit }
Comment