Hello! I am running a multilevel mixed model and I need to plot two way and three interactions. I tried this syntax but it didn't work:
margins x1 dydx( x2 ) at(x2 = (1(1)7)) => x2 is on a scale of 0 to 7 and can be a decimal number.
Below are the steps that I took to plot the interactions:
1) create a new variable for each interaction (not using the "##" sign)
2) mean center x1 by country. x2 is categorical
2) run the mixed model with this code: xi: xtmixed y i.x1 c.x2 x3 x4 x5 x6 ||country: x1, cov(unstructured) mle var vce(robust)
4)margins x1 dydx( x2 ) at(x2 = (1(1)7))
I am getting an error : r(111) that x2 is ambiguous abbreviation (although it's not).
Please advise,
Thank you,
margins x1 dydx( x2 ) at(x2 = (1(1)7)) => x2 is on a scale of 0 to 7 and can be a decimal number.
Below are the steps that I took to plot the interactions:
1) create a new variable for each interaction (not using the "##" sign)
2) mean center x1 by country. x2 is categorical
2) run the mixed model with this code: xi: xtmixed y i.x1 c.x2 x3 x4 x5 x6 ||country: x1, cov(unstructured) mle var vce(robust)
4)margins x1 dydx( x2 ) at(x2 = (1(1)7))
I am getting an error : r(111) that x2 is ambiguous abbreviation (although it's not).
Please advise,
Thank you,
Comment