Multilevel Regression PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
 Alex posted on Monday, October 17, 2005 - 8:34 pm

I am running a multilevel regression analysis using Mplus (with random intercepts and slopes).

In my model, I've entered three continuous level 2 independent variables, two dummy-coded level 1 independent variables and a continuous dependent variable.

My level 2 sample size is only 10 (level 1 sample size is 300). I am using the default estimator, MLR.

The model runs and I get the corresponding output. However, I also get the following error message:



To what extent (if at all) can I trust my results (If I counted correctly, the number of estimated parameters is 12)?

Thanks for your help!
 Boliang Guo posted on Tuesday, October 18, 2005 - 1:43 am
see raudenbush's hlm book, the minmum number of level 2 unit is 30 but he conducted a meta analysis with 19 studies. the number of level2 unit in your study is really small and you are also not lucky to get the good result. can you modle a complex OLS equation with only 10 case?
if you have no strong theory background about the between l2 unit variance, then, try ols.
 Joanna Harma posted on Monday, August 13, 2007 - 5:30 am
Dear Dr. Muthen
I am trying to run multilevel logistic regression analysis, with ML estimator, to identify variables that significantly effect the school type that a child goes to. At the micro level I have child characteristics and at macro level I have family characteristics. I have following questions about the analysis:

1) When I run the null model I get intercept variance at the macro-level but I do not get intercept coefficient. How can I get it? Is threshold the intercept coefficient?

2) Is the fact that my model has only random intercept and no random slope good enough justification (taking into account hierarchical data) for multilevel modelling?

3) Can I use var/s.e. to test if the intercept in null model is random or not. Or will I have to do some other test like fixing variance of intercept to zero and doing likelihood ratio test? Is estimate/s.e. for covariates, variances and covariances z-score or t-value?

Many thanks
p.s. I hope you had great vacation.
 Joanna Harma posted on Monday, August 13, 2007 - 5:31 am
one last question I could not post due to post limit.

In order to test model fitness I am using loglikelihood ratio test. What I am doing is I introduce a covariate in the model and record the loglikelihood value and then in the second step I fix the coefficient of that covariate to zero and record second loglikelihood value. Then I multiply the difference (second first) of two recorded values with -2 and do chi-square test. Is this way correct? Or is there any other way of checking model fitness?

Many thanks
 Matthew Cole posted on Monday, August 13, 2007 - 1:17 pm
For the LRT, take 2 times the difference in H0 Value from the model fit, and take the difference in model parameters as the df. For example, assume the first model has an H0 = 5237.921, df = 16, and for the second model, if H0 = 5236.561, df = 20, 5237.921-5236.561 = 1.36 * 2 = 2.72, df = 4. Chi-square for df = 4 critical value = 9.488, therefore, chi-square 4 = 2.72 > .05, and the second model is not an improvement over the first model.
 Linda K. Muthen posted on Tuesday, August 14, 2007 - 6:39 pm

If a post does not fit in the space provided in one window, it is too long for Mplus Discussion. Please do not double post in the future.

1. Yes.
2. Yes.
3. Yes as an approximation. Because you are testing a variance against zero which is on the border of admissible values, this test may have problems. There is a large literature on this topic.

I think when you test two nested models where covariates values are fixed to zero and where they are free, the test describes the significance of the covariates. I don't think it says that the model with covariates is better.
 Joanna Harma posted on Wednesday, August 15, 2007 - 5:56 am
Dear Linda,
Regarding intercept coefficient in multilevel regression.
UCLA website has presented example from Snijders and Bosker using MPlus in chapter 14. In all the examples intercept coefficients has been shown by S & B as threshold for dependent variable at between level, but with negative sign.
Could you please clarify if intercept coefficient is threshold or threshold with (-) sign? Also, when this intercept coefficient for null model is converted to probability will it be same as proportion of 1 in the dependent variable?
Many thanks and sorry about previous post.
 Linda K. Muthen posted on Wednesday, August 15, 2007 - 10:06 am
Yes, the intercept and threshold are the same except for sign.

Yes, the probability is for the u=1 not u=0.
 Joanna Harma posted on Thursday, August 16, 2007 - 12:49 am
Dear Linda,
Following what you told I ran null model with just dependent variable at between level. Results are:
Estimates S.E. Est./S.E.

Q2$1 0.709 0.650 1.090

Q2 34.909 12.985 2.688

From what you told me my intercept coefficient is -0.709. When I convert it to probability of u=1 it comes out as 0.33 where as I have 41.3% observations as u=1 in my sample. Why am I getting this difference? Shouldn't the two probabilites be same?
Many thanks
 Linda K. Muthen posted on Thursday, August 16, 2007 - 8:53 am
You would need to use information from both the within and between parts of the model to obtain the probability that you want. This can be done only with numerical integration.
 radanielina-hita marie louise posted on Monday, August 06, 2012 - 9:35 am

I am running a "Random Intercept Random Slope with Level 1 & 2 Predictors". My level 2 predictor is the school SES. The DV is fruit intake. I got the following error message: One or more between-level variables have variation within a cluster for one or more clusters. Check your data and format statement.

This is the code that I used:

Within = eat_frontof TV;
between= SES;

slope |fruit on eat_TV;

fruit slope on eat_TV;
fruit with slope;

Thanks for your help

 Linda K. Muthen posted on Monday, August 06, 2012 - 9:57 am
Any variable on the BETWEEN list must have the same value for every member of a cluster. Apparently SES does not meet this criterion. If you can't figure it out, please send the output, data, and your license number to
 Anne Casper posted on Wednesday, January 20, 2016 - 9:27 am

I am running a multilevel regression analysis with two predictors and their interaction. Both predictors are groupmean centered level 1 variables. The interaction term is significant and I would now like to do simple slope analyses.

Q1: I requested TECH3 to obtain the asymptotic covariance matrix in order to use the Preacher et al online tool for mulitlevel simple slopes. All the estimates in TECH 3 end with D-01 or D-02 or D-03. Could you tell me what this means? Does it look correct to you?

Q2: Is it also possible to use MODEL CONSTRAINT for calculating the simple slopes? If so, how would I do this?

Many thanks in advance,
 Bengt O. Muthen posted on Wednesday, January 20, 2016 - 7:26 pm
Q1. As an example 0.5D-01 is the same as 0.05.

Q2. I don't think you need to bother with the route of TECH3 but can instead follow suggestions on our Mediation page:
 Anne Casper posted on Wednesday, January 20, 2016 - 11:56 pm
Dear Dr. Muthen,

many thanks for your quick help!

 Andrea M Reina Tamayo posted on Monday, February 06, 2017 - 3:52 am
I have a question about the covariance structure used by MPlus.
I run a model in SPSS and there I have to specify the covariance structure, I can choose from VARIANCE COMPONENTS, AUTOREGRESSIVE(1), COMPOUND SYMMETRY, and several others.
However, in Mplus, I just specify ANALYSIS:
Type is twolevel GENERAL. I do not know what kind of covariance structure Mplus is using as default. Could you inform me about this?
 Bengt O. Muthen posted on Monday, February 06, 2017 - 3:37 pm
Usually it is zero correlations. You will see in the output what has been estimated. If it is not shown it is zero.
 Andrea M Reina Tamayo posted on Wednesday, February 08, 2017 - 7:44 am
Hi Bengt, thank your for your response. I think I had to add some information about my design.

I have 87 individuals, who completed 3 measures a day for 5 days. Therefore, there is dependance in my data because of the repeated measures. In SPSS and R, I can control for this with an autoregressive covariance matrix. I cannot specify this on Mplus, or can I?

Also, I am not sure if I should specify a three level model (moments, nested within days, nested within individuals), or a two level model because in chapter 9 I read that for longitudinal data Mplus has 1 level less than other softwares. Therefore, I thought of keeping my long format data and having two levels only, but how does Mplus know the order of the observations if there is no third level?

I think is important to know that I am not examining growth or change, just regressions on the DV measured in the moment from predictors that were measured in the same moment.

I appreciate your help,

 Bengt O. Muthen posted on Wednesday, February 08, 2017 - 3:58 pm
Use wide format so that you have 15 columns. Then say

y1 on x1;
y2 on x2;

You can then use UG ex6.17 or simply correlate the residuals of adjacent time points, e.g.:

y1 WITH y2;
 Andrea M Reina Tamayo posted on Thursday, February 09, 2017 - 1:29 am
Hi Bengt,

Thank you for your reply. I am a bit confused still though. If I use the wide format and regressed
y1 on x1
y2 on y2 ...
y15 on x15

then, I would have 15 slopes. I would be able to do autocorrelation, if I follow the example on the UG, but I want to compare my results with SPSS and R. In these programs, I get one slope that takes into account the auto correlation. How can I get 1 slope when I have 15 DVs (representing one variable) and 15 predictors (representing one variable)?
 Bengt O. Muthen posted on Thursday, February 09, 2017 - 5:00 pm
You can apply equality constraints on the slopes

y1 on x1 (1);
y2 on x2 (2);

You can also hold autocorrelations equal across time.
 Andrea M Reina Tamayo posted on Friday, February 10, 2017 - 4:36 am
Ahh ok thank you! I was just wondering why is it not possible to run this data with the type=two level? Would the estimates be wrong? Is it not multilevel data?
 Bengt O. Muthen posted on Friday, February 10, 2017 - 10:36 am
Mplus does not allow an autocorrelation in the type=twolevel, long format. That will be in Version 8.
 Andrea M Reina Tamayo posted on Monday, February 13, 2017 - 5:41 am
aah ok! Good to know :-) Thanks for all your help!

 Bengt O. Muthen posted on Monday, February 13, 2017 - 4:50 pm
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message