HI,
I want to run different models on different interaction terms by using a loop.
I have 3 moderating variables(x1, x2, x3) and 1 independent variable(x0). I want to create a loop where gives me a result of all possible models showing like:
Model 1: y = x0
Model 2: y= x0 + x1 + x0*x1
Model 3: y= x0 + x2 + x0*x2
Model 4: y = x0 + x1 + x0*x1 + x2 + x0*x2
Model 5: y= x0 + x1 + x0*x1 + x2 + x0*x2 + x3 + x0*x3
All suggestions would be appreciated. Thank you. Pawinee
I want to run different models on different interaction terms by using a loop.
I have 3 moderating variables(x1, x2, x3) and 1 independent variable(x0). I want to create a loop where gives me a result of all possible models showing like:
Model 1: y = x0
Model 2: y= x0 + x1 + x0*x1
Model 3: y= x0 + x2 + x0*x2
Model 4: y = x0 + x1 + x0*x1 + x2 + x0*x2
Model 5: y= x0 + x1 + x0*x1 + x2 + x0*x2 + x3 + x0*x3
All suggestions would be appreciated. Thank you. Pawinee