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
Interaction terms in mixed-effects regressionHi statalisters ... I need some help to interpret the coefficients of some mixed-effects models in m…
histogram for continuous variableHello, I'm new in the forum and have a question for you. I work with panel data coming from a resea…
Graphing based on a condition of longitudinal dataDear Statalist User, I have a problem regarding how to graph two scatter plots and their fitted lin…
InterpretationDear community, I have a question regarding the interpretation of the size of a coefficient. e.g. I…
Generating a single variables for multiple valuesHello, i am trying to divide the 50 states into 2 categories: "childcare" and "no childcare". I am…
Subscribe to:
Post Comments (Atom)
0 Response to Run Many Regressions
Post a Comment