Message/Author 


Hello, I am new to mplus and using it for the first time to run a multilevel model. I am using a twolevel model and estimating the impact of an intervention on several outcomes. One of the covariates is dummycoded to indicate intervention status. My question is how do I get adjusted means by intervention status for this model (i.e, adjusted mean for the intervention and control groups)? 


You don't say on which level the intervention is and you don't say what you mean by adjusted mean (adjusted for what?). 

HShah posted on Thursday, August 11, 2016  2:03 pm



Apologies for the lack of information. Level 2: classroom Level 1: sex, race, pretest scores, etc. and intervention status (0/1) I'm trying to figure out how to get adjusted means and standard errors controlling for all the covariates in the model. I hope this clarifies things! 

HShah posted on Thursday, August 11, 2016  2:05 pm



Edit to add: adjusted means and standard errors for intervention status controlling for all covariates in the model. In SAS (which I am more familiar with), you would use the lsmeans statement to get this. 


I think that is simply the slope for the 0/1 dummy covariate. 

HShah posted on Thursday, August 11, 2016  5:31 pm



I'm a little confused. Are you saying the adjusted mean and standard errors for the intervention and control group (based on my dummy coded level 1 variable for intervention status) are present in the output? Or is there a special command I need to use to obtain these? 


Q1 Yes. Q2 No. 

HShah posted on Friday, August 12, 2016  6:45 am



Thank you for your response. In the way my model is set up, 'slope' in the output does not represent the least square/adjusted mean for the two groups, but rather the difference in means between the two groups. My outcome is continuous and the variable indicating group membership to the intervention or control group is a binary variable (0=control group, 1= intervention group) Coefficients and Standard errors from results: Intercept= 90.43 (3.023) Intervention status(0/1): 4.308 (1.34) What I need to obtain is the means and SEs when intervention status =0 and when intervention status=1. 

HShah posted on Friday, August 12, 2016  1:44 pm



In case it's still not clear, what I am trying to figure out is whether there is a way to output lsmeans/estimated marginal means/adjusted means. I have been able to do this with ease in other statistical programs. Thanks! 


Let's see what you are after by using some simple notation. Say that x1 is the dummy binary covariate representing the intervention variable and x2 is a covariate that you want to adjust for: y = a + b1*x1 + b2*x2 + e. First, consider marginal means. When x1=0, (1) mean(y) = a + b2* mean(x2). When x1=1, (2) mean(y) = a + b1 + b2*mean(x2). Next consider conditional means. (3) mean(y  x1=0, x2) = a + b2*x2, (4) mean(y x1=1, x2) = a + b1 + b2*x2. Based on any or all of these formulas, please tell me what quantity you are looking for. 

HShah posted on Friday, August 12, 2016  2:59 pm



Thank you for your response, Dr. Muthen. I am trying to get the mean and standard error for Y (c6pvtss) when x1 (yrs_rec)= 0 and when X1=1. My syntax is pasted below. usevariables are c6pvtss sex race_hisp race_black pced_rec pcrelat_mother enroll_rec ppvt_cen plogit yrs_rec pre_classid; Missing are all (9999) ; WITHIN = sex race_hisp race_black pced_rec pcrelat_mother enroll_rec ppvt_cen plogit yrs_rec; BETWEEN = ; CLUSTER = pre_classid; ANALYSIS: TYPE = twolevel ; MODEL: %WITHIN% !CHANGE YOUR DEPENDENT VARIABLE HERE c6pvtss ON sex race_hisp race_black pced_rec pcrelat_mother enroll_rec ppvt_cen plogit yrs_rec; %BETWEEN% c6pvtss; OUTPUT: sampstat; 

HShah posted on Friday, August 12, 2016  3:53 pm



So with respect to what you provided, I'm looking for the marginal means and standard errors (1) and (2) [i.e. When X1=0 and when X1=1 controlling for X2]. Thank you for your help! 


Ok  that sounds like you are interested in (1) and (2). I don't see how those are adjusted means  they are just the marginal means. You can compute ymean expressions such as (1) and (2) using Model Constraint using a and b parameter labels from the Model command and using the sample means of the covariates. You can get estimated ymeans automatically if you use a 2group analysis and request the RESIDUAL option of the Output command. 

HShah posted on Friday, August 12, 2016  9:15 pm



Thank you again and sorry for the confusion in terminology. From my followup investigation to implement what you suggested, I found that the grouping variable in a twogroup analysis cannot be at level1. Am I understanding this correctly? If yes, is there a workaround? 

Back to top 