It would be most helpful to get any comments on the following problem:
I have tested two different ways to code an interaction term in DM, and don't understand why do they differ and which is the correct way. This interaction is between an individual time-variant covariate (age class, young/old) and a season. I also need to build candidate model including the interaction but not the independent effects, thus it is important to understand how to build these models also without using the product-function (if possible...).
Age class is coded as an individual time-variable covariate in my data; for each individual I have coded an age class constraint for each week. These weekly age class constraints are named as var1, var2, var3 etc. in the .inp -file and get values -1(individual not yet/anymore in the study that week), 0(young), 1(old)). Do I mixed up things somehow since the covariate names are var1, var2 etc. but also in the DM funtions, columns are coded with var (instead of col as it used to be in an earlier version)?
Here are simplified design matrix examples, model {age+age*snowseason}:
1) I build the interaction with the product of colums -function:
Age Snowseason Age*Snowseason Constant
1:s var1 1 product(var1,var2) 1
2:s var2 1 product(var1,var2) 1
3:s var3 1 product(var1,var2) 1
4:s var4 0 product(var1,var2) 1
5:s var5 0 product(var1,var2) 1
6:s var6 0 product(var1,var2) 1
7:s var7 0 product(var1,var2) 1
8:s var8 0 product(var1,var2) 1
9:s var9 0 product(var1,var2) 1
10:s var10 0 product(var1,var2) 1
2) I build the interaction without using the product function:
Age Snowseason Age*Snowseason Constant
1:s var1 1 var1 1
2:s var2 1 var2 1
3:s var3 1 var3 1
4:s var4 0 0 1
5:s var5 0 0 1
6:s var6 0 0 1
7:s var7 0 0 1
8:s var8 0 0 1
9:s var9 0 0 1
10:s var10 0 0 1
When I run this model built according to each example, I get different results. Why?