Message/Author 

James Algina posted on Wednesday, September 02, 2015  3:17 pm



Hello: In the following model dv and cov are dichotomous and have been declared in the categorical statement. trt and site are each coded .5 and .5. trt varies at level 2 and site at level 3. The estimator is Bayes. It there a way to introduce a cov by trt interaction at both level1 and level2. MODEL: %within% dv on cov; %between tchid% TRT_DV  dv on trt; dv on Cov; %between schid% TRT_DV on site (TS); dv on site (S); Cov on site; dv WITH COV TRT_DV; COV WITH TRT_DV; Thanks, Jamie 


It looks like you are using a latent variable decomposition of the cov variable. If not intended, you should declare it as Within. The way you go influences how you handle the interaction  oberved product or using XWITH. 

James Algina posted on Wednesday, September 02, 2015  5:02 pm



I am using a latent decomposition, but would also be interested to know whether you can use an observed decomposition and still treat the covariate at dichotomous as level1. I tried using XWITH but it resulted in the following error message: Interaction variables are not allowed with ESTIMATOR=BAYES. Also I found that you can include CxT at level1 and level2 if you estimate the variance of CxT at level1, 2, or3. Two potential problems with this approach 1. I am not sure I am defining a meaningful interaction at either level. 2. CxT is not normally distributed and I am not sure how robust the procedure is to nonnormality. Jamie 


You can use define: CxT= cov*trt; within=CxT; model: %within% dv on cov CxT; Similarly form the "observed" covariate interaction for level 2, but you will need the average cov value over level 2 clusters. 

James Algina posted on Wednesday, September 02, 2015  7:26 pm



Hello and thank you for your response. In the following mcov comprises means for the level2 clusters. Is the following program what you suggested? (I left out the code for number of iterations and processors.) within Cov L1CxT; between (tchid) trt L2CxT (schid) site; . . . define: L1CxT=Cov*TRT; L2CxT=mcov*trt; . . . ANALYSIS: ESTIMATOR = BAYES; type=threelevel random; MODEL: %within% dv on cov L1CxT; %between tchid% TRT_DV  dv on trt; dv on MCov L2CxT; %between schid% TRT_DV on site (TS); dv on site (S); MCov on site; dv WITH MCOV TRT_DV; MCOV WITH TRT_DV; 


Yes 

James Algina posted on Thursday, September 03, 2015  12:09 pm



In regard to the original model in this thread (shown below) where dv and cov are dichotomous and there is a latent decomposition of cov. My belief is that using estimator = Bayes, there is no way to add an interaction of trt (an observed variable) and the random effect for cov at level2. Is this correct? If it is not correct can you show me the code to add the interaction or direct me to an example that illustrates the code? MODEL: %within% dv on cov; %between tchid% TRT_DV  dv on trt; dv on Cov; %between schid% TRT_DV on site (TS); dv on site (S); Cov on site; dv WITH COV TRT_DV; COV WITH TRT_DV; Thank you for all of your help. Jamie 


I think it is correct. 


Dear MplusTeam, is it possible to calculate the ICC for a dichotomous variable in a threelevel model? thanks Christoph 


I would recommend reading this paper http://ageconsearch.umn.edu/bitstream/116030/2/sjart_st0031.pdf The latent ICC is straight forward and would use directly the variances on the between levels. The manifest ICC can also be computed using the method described in that paper  it generalizes to three level but it is not straight forward. 


thanks a lot christoph 

Back to top 