I am using the NLME package to run regressions using lme(DV~IV).

I am including random intercept and random slope for two IVs, all of these by subject.

I have it currently written as lme(data = data, fixed = DV ~ X1 + X2, random = reStruct (~1+X1+X2 | subject).

When switching the ordering of X1 and X2 in the random structure, I get different results, which makes me believe that there is some sort of nesting.

There is very little information (that I can find) on multiple predictors (I find plenty on code for random slope for 1 predictor), especially for NLME. Any help understanding what's going on and how to properly write the code would be tremendously appreciated.

Similar questions and discussions