Hello Forum Members,
I have loaded my 'DATA' file and I seek to run all of these models on a simple regression.
CAT = X1 + X2, for CAT1 = 1 and CAT2 = 1
CAT = X1 + X2, for CAT1 = 2 and CAT2 = 1
CAT = X1 + X2, for CAT1 = 3 and CAT2 = 1
CAT = X1 + X2, for CAT1 = 4 and CAT2 = 1
CAT = X1 + X2, for CAT1 = 1 and CAT2 = 2
CAT = X1 + X2, for CAT1 = 2 and CAT2 = 2
CAT = X1 + X2, for CAT1 = 3 and CAT2 = 2
CAT = X1 + X2, for CAT1 = 4 and CAT2 = 2
DOG = X1 + X2, for CAT1 = 1 and CAT2 = 1
DOG = X1 + X2, for CAT1 = 2 and CAT2 = 1
DOG = X1 + X2, for CAT1 = 3 and CAT2 = 1
DOG = X1 + X2, for CAT1 = 4 and CAT2 = 1
DOG = X1 + X2, for CAT1 = 1 and CAT2 = 2
DOG = X1 + X2, for CAT1 = 2 and CAT2 = 2
DOG = X1 + X2, for CAT1 = 3 and CAT2 = 2
DOG = X1 + X2, for CAT1 = 4 and CAT2 = 2
FROG = X1 + X2, for CAT1 = 1 and CAT2 = 1
FROG = X1 + X2, for CAT1 = 2 and CAT2 = 1
FROG = X1 + X2, for CAT1 = 3 and CAT2 = 1
FROG = X1 + X2, for CAT1 = 4 and CAT2 = 1
FROG = X1 + X2, for CAT1 = 1 and CAT2 = 2
FROG = X1 + X2, for CAT1 = 2 and CAT2 = 2
FROG = X1 + X2, for CAT1 = 3 and CAT2 = 2
FROG = X1 + X2, for CAT1 = 4 and CAT2 = 2
My attempt to do it is right here:
foreach OUT in CAT DOG FROG {
for values CAT1 = 1/4 { forvalues CAT2 = 1/2 {
regress `OUT' X1 X2 if CAT1 = CAT1 & CAT2 = CAT2 }}}
But when I do this actually I do not get all of the models. I should end with 24 but only get 8. Where do I improve it?
Related Posts with Run Many Regressions
Pseudo-R^2 and t-statistics after stratification matchingDear all, I am currently trying to apply different propensity score matching estimators to my data.…
Create preference order for source of dataHello everyone, I have occupational data for a large set of countries over time that come from diff…
Hausman test for multilevel modelI want to make a Hausman test, to test wether my mixed effects model is different from a fixed effec…
How can I overlay Weibull survival curves and Kaplan-Meier curves?Dear Statalist users, I am trying to plot a Weibull survival curve together with a Kaplan Meier cur…
Error 301After I run the following regression: bysort FYEAR SIC: regress TACCATw ATLAGINVw REVATLAGw PPEATLAG…
Subscribe to:
Post Comments (Atom)
0 Response to Run Many Regressions
Post a Comment