Unconditional model PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Anonymous posted on Thursday, November 20, 2003 - 10:48 pm
Many multilevel books start with a unconditional model. That is, there is no level-1 and level-2 predictor.

Level one model

Y_ij = b_0j + e_ij

Level two model

b_0j = r00 + u_0j


This model is a very simple model. How can I set this model in MPLUS ?

I didn't specify any variable in "WITHIN" and "BETWEEN" commands because there is no predictor.

WITHIN = ;
BETWEEN = ;

In model statement

MODEL:
%WITHIN%
y ON ;
%BETWEEN%
y ON ;

I think there is something wrong in my command file. Could you let me know how to set up this simple model in MPLUS ?
 Linda K. Muthen posted on Friday, November 21, 2003 - 6:21 am
Leave out the WITHIN and BETWEEN statements. And do the model as follows:

MODEL:
%WITHIN%
y;
%BETWEEN%
y;
 Anonymous posted on Friday, November 21, 2003 - 1:04 pm
Thanks for replying

I have another question.

******************
MODEL:

%WITHIN%
s | y ON x;
%BETWEEN%
y s;
******************

In a output I can get means and variances for y and s
but I like to have a covariance between y and s.
How can I get this one ?

Thanks
 Linda K. Muthen posted on Friday, November 21, 2003 - 4:59 pm
MODEL:

%WITHIN%
s | y ON x;
%BETWEEN%
y s;
y WITH s;
 Anonymous posted on Saturday, November 22, 2003 - 9:57 am
In the MPLUS manual (page 38-39) there are many estimators. I am wondering whether ML is the same as Full Maximum Likelihood or Restricted Maximum Likelihood.

If ML in MPLUS is Full maximum likelihood estimator is there restricted maximum likelihood estimator in MPLUS ?

SPSS or SAS has the two estimators (FML and REML). I am looking for the equivalent estimators in MPLUS.

Thanks
 Linda K. Muthen posted on Saturday, November 22, 2003 - 10:23 am
Full-information maximum likelihood. Mplus doesn't have REML.
 Anonymous posted on Saturday, November 22, 2003 - 10:31 am
When I check a loglikelihood value of HO in MPLUS this value is almost the same as one calculated by SPSS using REML method. Is the default estimator (MLR : maximum likelihood estimator with robust standard error) in MPLUS is similar to REML in other software ?

***********************
other software MPLUS

FML ML
REML MLR
***********************

If not, what is the difference between MLR in MPLUS and REML ?

Thanks for the quick reply
 bmuthen posted on Saturday, November 22, 2003 - 10:51 am
The Mplus ML estimator is the same as FML (also called FIML). Mplus does not have REML. REML ("restricted ML") has been proposed with the aim of getting better variance estimates with small samples. You will probably see rather small differences between REML and ML (FML). The Mplus MLR estimator gives ML (FML) parameter estimates and robust SEs. Such SEs are also called sandwich or Huber-White. The robustness is against non-normality and model misspecification primarily.
 Helen Dennis posted on Tuesday, December 30, 2003 - 12:47 pm
I ran a null model in mplus using the format:
MODEL:
%WITHIN%
y;
%BETWEEN%
y;

To be sure that I was running what I thought I was running, I also ran the null model in HLM 5.0 with FIML. I got similar estimates for the intercept, but VERY different estimates for the level 1 and level 2 variances (much larger estimates in Mplus). Should I have expected this? If yes, Why? THANKS
 bmuthen posted on Tuesday, December 30, 2003 - 12:54 pm
Please send your HLM and Mplus outputs to support@statmodel.com
 Linda K. Muthen posted on Tuesday, December 30, 2003 - 3:47 pm
I don't think that you have the same data for the two runs. HLM has 54 clusters and Mplus has 57.
 Sally Czaja posted on Friday, November 05, 2004 - 9:16 am
As in the 11/20/03 posting, I want to run an unconditional multi-level model. The dependent variable is dichotomous. Following the 11/21/03 advice, my commands include:
ANALYSIS:
TYPE IS twolevel ;
ESTIMATOR IS mlr;
MODEL:
%WITHIN%
Resi6o8A;
%BETWEEN%
Resi6o8A;
OUTPUT: SampStat standardized;
I get 2 error messages:
*** ERROR in Model command
Variances for categorical outcomes are not currently defined
on the within level. Variance given for: RESI6O8A
*** ERROR in Model command
Variances for categorical outcomes can only be specified using
PARAMETERIZATION=THETA with estimators WLS, WLSM, or WLSMV.
Variance given for: RESI6O8A

What should I be doing differently?
Thanks.
 bmuthen posted on Friday, November 05, 2004 - 11:21 am
In 2-level analysis of a binary variable, there is only a second-level variance to be estimated, not a first-level variance. So, delete Resi6o8A from the Within part of the model.
 Vera  posted on Saturday, December 17, 2005 - 12:15 pm
I am also trying to run the unconditional means model using the syntax you provided. However, I get the following message: *** ERROR in Model command
Unknown variables: %WITHIN%
in line: %WITHIN%


What am I doing wrong?
Here's what I entered:
DATA: FILE IS anx.dat;
VARIABLE: NAMES ARE y;
MODEL:
%WITHIN%
y;
%BETWEEN%
y;


THANKS!
 bmuthen posted on Saturday, December 17, 2005 - 1:01 pm
Please send your output and license number to support@statmodel.com.
 Anonymous posted on Friday, March 03, 2006 - 8:38 am
I noticed the above discussions regarding REML and Mplus.

I'm wondering if Mplus 4.0 now allows REML for multilevel models ?
 Linda K. Muthen posted on Friday, March 03, 2006 - 9:32 am
No, Mplus does not have REML. Typically REML is not that different from ML unless samples are very small.
 mmm posted on Tuesday, June 19, 2007 - 10:32 am
I am comparing variance estimates between my null model and one with fixed individual level predictors (no between). The variance estimate for my null model is smaller compared to the second model mentioned above with predictors.

The response variable is dichotomous. Seems counterintuitive since I am adding predictors, one would expected variances to decrease. Is this something you have seen before? Thank you.
 Linda K. Muthen posted on Tuesday, June 19, 2007 - 5:49 pm
I think it would be unusual for this to happen but it could. The model with covariates is more stable than one without covariates. Therefore, the one without may have larger sampling variability.
 Stephanie Fitzpatrick posted on Friday, May 29, 2009 - 9:09 am
I trying to run the following model:
Model: exe by q20* q21 q22 q23 q24;

exe@1;

q21@0;

postfit on exe gender peduc d1 d2;
exe on d1 d2;


and I keep getting this error message: Variances for categorical outcomes can only be specified using
PARAMETERIZATION=THETA with estimators WLS, WLSM, or WLSMV.
Variance given for: Q21

The residual variance for this variable is negative and I would like to set it to zero because otherwise the model fits great.
 Bengt O. Muthen posted on Friday, May 29, 2009 - 9:23 am
With categorical outcomes there is in general not a free parameter for a residual variance of a factor indicator because it cannot be identified as a separate parameter. Exceptions are multiple-group modeling and longitudinal modeling. The negative residual variance that you see is computed as a function of other parameters. Therefore it is not easy to fix or constrain to be positive.

Typically a negative residual variance is an indication that something is wrong with the model so that it should be modified. For example, is the exe factor really unrelated to gender and peduc?
 Eva Van de gaer posted on Tuesday, February 23, 2010 - 10:17 pm
Dear Linda or Bengt,

I am comparing the estimation of an empty or unconditional 2 level model (no covariates - just variance decomposition) between different software packages. HLM and Mlwin give me very similar results whereas Mplus is doing something differently. Overall, Mplus gives me higher estimates for the within and between variances and SE. Can you please explain me why this is happening?

Thank you,
Eva
 Linda K. Muthen posted on Wednesday, February 24, 2010 - 6:01 am
If you have the same data, the same sample size, the same model, and the same estimator, the three programs will give the same results. I would check these three things first. Otherwise I would need to see the three outputs and your license number at support@statmodel.com.
 Paul R. Hernandez posted on Monday, March 29, 2010 - 3:25 pm
Dear Linda or Bengt,

I am trying to discern if it is possible to use Mplus to run a meta-analysis. I am able to run an unconditional random effects model in HLM, using the V-Known feature. The V-Known feature, the level-1 variance of the model is treated as "known", such that:

Level one model
Y_ij = b_0j + e_ij

where e_ij = "known" sampling variance derived from each study

Level two model
b_0j = r00 + u_0j

Thanks for your help.
 Tihomir Asparouhov posted on Tuesday, March 30, 2010 - 1:38 pm
You can do that as in http://statmodel.com/download/webnotes/mc3.pdf

with random slopes on a covariate = sqrt(variance).

It is important to define the random slope as a within level variable and use 2 dimensional numerical integration.
 Roza Meuleman posted on Tuesday, May 04, 2010 - 6:23 am
Dear Linda or Bengt,

I would like to know if it is possible to specify an unconditional twolevel model in which the y is a latent variable (y by x1 and x2). How to deal with the fact that within-level variables cannot by used on the between level?

MODEL:
%WITHIN%
y on x1 x2;
%BETWEEN%
y on x1 x2;

Thank you very much in advance.
 Linda K. Muthen posted on Tuesday, May 04, 2010 - 9:50 am
If you don't put a variable on either the BETWEEN or WITHIN lists, the variable can be used on both levels. See Example 9.1 for a more detailed explanation. Note that a factor with two indicators is not identified.
 Utkun Ozdil posted on Thursday, April 28, 2011 - 12:42 pm
Hi,
I'm analyzing a two-level structural equation model with categorical outcomes. While testing the unconditional model my syntax is as below in its simplest form:
VARIABLE:
NAMES ARE class q1-q8
USEVARIABLES ARE class q1-q8;
CATEGORICAL ARE q1-q8;
CLUSTER IS class;
ANALYSIS:
TYPE IS TWOLEVEL;
ESTIMATOR IS WLSM;
MODEL:
%WITHIN%
fw BY q1 q3 q2 q4;
aw BY q5 q6 q8 q7;
%BETWEEN%
fb BY q4 q2 q1 q3;
ab BY q8 q6 q7 q5;
OUTPUT:
SAMPSTAT STANDARDIZED;

In order to report how much of the total variance is attributable to the within-level and to the between-level partially, are we going to use the "Variances" section for the latent variables fw,aw,fb,and ab? Or are we to request something else in the OUTPUT command?
Thanks in advance...
 Linda K. Muthen posted on Friday, April 29, 2011 - 9:16 am
For the factors, you would need to hold the factor loadings equal across between and within. This may not make sense. If it does, the model estimated variances of the factors would show you the within and between parts.
 Utkun Ozdil posted on Friday, April 29, 2011 - 10:30 am
I have the estimated variances of the latents for the within and between parts. I calculated the ICCs for these latents by hand.

In some articles the variance attributed to the within-level and between-level are reported in percentages partially. I expected to find these percentages in my output but I think Mplus does not provide these values?

And my last question is about two-level EFA. The Mplus output did not display the variances accounted for by each factor though the eigenvalues are demonstrated. Is there a specific calculation or a command to obtain these percentages?

Thanks...
 Linda K. Muthen posted on Friday, April 29, 2011 - 11:13 am
No, we don't provide these percentages. We also don't provide the variances account for by each factor.
 MKS posted on Tuesday, July 26, 2011 - 8:34 am
I would like to compare two non-nested models with each other. What options i have except AIC and BIC?
Thanks for your help.
 Linda K. Muthen posted on Tuesday, July 26, 2011 - 12:40 pm
None that I know of.
 Joe King posted on Saturday, November 12, 2011 - 4:00 pm
when doing the full unconditional model is OK to just leave the model statement blank and have the outcome variable in the place where i specify the count model (its a ZINB model). also how would one get an estimate of ICC in a two level ZINB model?
 Bengt O. Muthen posted on Saturday, November 12, 2011 - 4:59 pm
I think you need to mention the variable name in the MODEL command, but try it.

ICC is a tricky concept with counts because there is no within-level variance parameter.
 Monica Torreiro-Casal posted on Tuesday, June 05, 2012 - 5:08 am
Dear Professor Muthen

Is it possible to use the Huber-White Sandwitch Estimator in Mplus and if so what is the command for it?

Thank you so much, Monica
 Linda K. Muthen posted on Tuesday, June 05, 2012 - 11:44 am
Yes, use the MLR estimator.

ESTIMATOR=MLR;

in the ANALYSIS command.
 kirsten way posted on Monday, September 03, 2012 - 1:06 am
Hi, I've run an unconditional model with the syntax below and the output is stating df=0. Shouldn't the degrees of freedom be related to the number of groups (i.e. for me, 75)?

This is the syntax I have used below

VARIABLE: NAMES ARE ORGID WKGRPID ID TC RC AgYld AgColl AgFce AgAvd anxdep wellbeing harass1;

USEV ARE WKGRPID harass1;
CLUSTER IS WKGRPID;


ANALYSIS: TYPE IS TWOLEVEL;

MODEL:
%WITHIN%
harass1;
%BETWEEN%
harass1;

OUTPUT: STDYX;



*** WARNING in MODEL command
Variable is uncorrelated with all other variables: HARASS1
*** WARNING in MODEL command
All least one variable is uncorrelated with all other variables in the model.
Check that this is what is intended.
 Linda K. Muthen posted on Monday, September 03, 2012 - 6:15 am
The degrees of freedom are related to the number of parameters in the H1 model versus the number of parameters in the H0 model. In your case these are the same so the degrees of freedom are zero.
 Manuela Jimenez posted on Monday, September 30, 2013 - 3:17 pm
Hello,

I'm running an unconditional means model to get percentage of variance at the within and between level. I wanted to use the B/(B+W) formula for this using the unstandardized variance estimates but I get a between level variance of .000. However the output shows an ICC of .015, I'm wondering if I'm using the wrong information from the output to calculate the variance or if I'm doing something wrong
 Linda K. Muthen posted on Monday, September 30, 2013 - 3:48 pm
The icc's we give are based on the sample variances not the model estimated variances. I think this is what you are seeing.
 Manuela Jimenez posted on Tuesday, October 01, 2013 - 2:27 pm
Thanks for your quick response! So what I'm getting from your response is that the percentage of variance that I want to calculate and the ICCs that Mplus provides are somewhat different things, is this correct? If that's the case, where can I find the variance estimates needed to calculate the percentage of variance explained? Is it the unstandardized variance estimates or should I be looking somewhere else?
 Linda K. Muthen posted on Tuesday, October 01, 2013 - 2:57 pm
We compute ICC's using sample statistics. You are using model estimated values. The percentage of variance explained, R-square, is one minus the standardized residual. This is not related to ICC's.
 Manuela Jimenez posted on Tuesday, October 01, 2013 - 3:49 pm
I'm not sure I made myself clear. I'm trying to calculate percentage of variance explained of a variable at the between and the within level, not the percentage of variance explained of a dependent variable by an independent variable.
 Linda K. Muthen posted on Wednesday, October 02, 2013 - 12:04 pm
You can do a TYPE=TWOLEVEL BASIC to get the within and between variances that we use to compute ICC's.
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: