Within level matrix and between level... PreviousNext
Mplus Discussion > Multilevel Data/Complex Sample >
Message/Author
 Edward Mak posted on Sunday, June 08, 2008 - 2:38 am
I am a beginner of Mplus, and I am trying to run a multilevel analysis.
After running the program, a within level matrix and a between level matrix are shown.

My aim is to get one sample between-groups covariance matrix and one pooled wtihin-groups covariance matrix for inputing into a LISREL program.

However, I know that the sample between-groups covariance matrix equals to the summation of unbiased estimate of population within-groups covariance matrix and a scalar times the population between-groups covariance matrix.

So my questions are:
1. the between level matrix offered by Mplus is the sample between-groups covariance matrix or the population between-groups covariance matrix.

2. if the between level matrix offered by Mplus is the population between-groups covariance matrix, can I get the scalar by Mplus?

Thank you very much.
 Linda K. Muthen posted on Sunday, June 08, 2008 - 5:04 pm
1. What is printed depends on the scale of the dependent variables. See the SAMPLE and SIGB options of the SAVEDATA command for more information.

2. See Formula 201 of Technical Appendix 10 on the website or use the average cluster size as an approximation.
 Edward Mak posted on Monday, June 09, 2008 - 6:53 pm
Dear Linda,
Thank you for your quick reply.
I'm sorry that I still do not understand.
The following is part of the printed results .Would you mind spend some time to take a look?

SAMPLE STATISTICS
NOTE: The sample statistics for within and between refer to the maximum-likelihood estimated within and between covariance matrices, respectively.

ESTIMATED SAMPLE STATISTICS FOR WITHIIN
.
.
.
ESTIMATED SAMPLE STATISTICS FOR BETWEEN
.
.
.

My questions are
1. Is the matrix of the print-out "ESTIMATED SAMPLE STATISTICS FOR WITHIIN" = unbiased estimator of the pooled within-groups covatiance?

2. Is the matrix of the print-out "ESTIMATED SAMPLE STATISTICS FOR BETWEEN" = unbiased estimator of the between-groups covatiance, i.e. the E(S_B) of the formula 199 in Technical Appendix 10?

Thank you very much.

Edward
 Linda K. Muthen posted on Tuesday, June 10, 2008 - 10:02 am
From page 600 of the Mplus User's Guide:

WITHIN

For TYPE=TWOLEVEL and maximum likelihood estimation, the sample correlation and covariance matrices are the maximum likelihood estimated sigma within covariance and correlation matrices. For TYPE=TWOLEVEL and weighted least squares estimation, the sample correlation and covariance matrices are the pairwise maximum likelihood estimated sigma within covariance and correlation matrices. For ESTIMATOR=MUML, the sample correlation and covariance matrices are the sample pooled-within correlation and covariance matrices.

BETWEEN

For maximum likelihood estimation, it is the consistent maximum likelihood estimate of sigma between. For weighted least squares estimation, it is the pairwise maximum likelihood estimated sigma between covariance and correlation matrices. For ESTIMATOR=MUML, it is the unbiased estimate of sigma between.

This can be summarized for continuous outcomes according to your 2 questions. The printout you refer to says ML estimates which are consistent, not unbiased. The unbiased versions are given in the formulas 197 and 198.
 Edward Mak posted on Wednesday, June 18, 2008 - 10:17 pm
Dear Linda,
Thank you very much for your great help.
Edward
 Utkun Ozdil posted on Thursday, February 10, 2011 - 1:47 pm
Dear Linda,,
My question is about writing the MPlus syntax for the "estimation of the within structure" and the "estimation of the between structure" in proceeding the steps in Bengt's 1994 article.

I'm puzzled in that:

In order to estimate the within structure am I to specify a new data set with sample size n-G; and with sample size G for the between structure partially. Or am I to write TYPE= TWOLEVEL and write only %WITHIN% to get the within structure and then write only %BETWEEN% to get the between structure?

As a matter of fact I am unsure about how to write Mplus syntax to proceed these steps. Can you give an example syntax if possible?

Thanks..

Utkun
 Bengt O. Muthen posted on Thursday, February 10, 2011 - 2:19 pm
For the steps of the 1994 article you would first save the within and between covariance matrices. For the within analysis you would have as data the within covariance matrix and use a single-level analysis (not Type=Twolevel). Analogous for the between analysis.
 Utkun Ozdil posted on Friday, February 11, 2011 - 12:06 am
Two follow up questions;

1-In this sense,, without typing anything on the ANALYSIS: part I will only type on the SAVE DATA: command the SIGBETWEEN IS for the between structure and the SAMPLE IS for the within structure?

2- For both the within and the between structure,, in the MODEL: command I will type my single level model which I estimated in step 1?

Thanks...
 Linda K. Muthen posted on Friday, February 11, 2011 - 10:13 am
1. You would specify TPYE=TWOLEVEL BASIC; in the ANALYSIS command. Do not include a MODEL command. Use the WITHIN and BETWEEN options of the VARIABLE command appropriately.

2. You would use TYPE=COVARIANCE; in the DATA command. See the DATA command and Example 13.1 for further information. You would specify a single-level model in the MODEL command. It may not be the same for both within and between. And for NOBSERVATIONS, you use n-g for within and g for between.
 Chris Thomas posted on Tuesday, January 10, 2012 - 10:36 am
Dear Linda,
Thanks for your reply to my previous question in the Building a Multilevel Model thread. As a follow up, I have a separate question that I think fits better within this particular discussion.

I am trying to run a model with 4 factors on the within level (3 of which have 3 indicators, and 1 is a single-item), and on the between level I have those same 4 plus two between factor (1 has 3 indicators, the other is a single-item).

I have managed to successfully run a multilevel CFA using the TWO-LEVEL approach (%Within% and %Between%). However, I'm having a devil of a time achieving convergence when I run the structural model.

As a last resort, I have gone back and created the separate covariance matrices (Type = Two Level; SAVEDATA: sample=within.dat; sigb=between.dat), which seems similar to Bengt's 1994 article.

Using these matrices I reran separate CFAs and got matching results to those achieved with the TWO-LEVEL approach. Also, using these matrices I was able to run and achieve convergence for each of the structural models (within and between)separately.

I believe this approach precludes me from estimating cross-level effects (random slopes); but, otherwise is this separate matrix analyses an acceptable approach for estimating my structural models if I am only interested in the discrete effects at each level?
 Linda K. Muthen posted on Tuesday, January 10, 2012 - 2:14 pm
This is a good preliminary step but you need to run the full model. Please send the CFA output and the SEM output and your license number to support@statmodel.com.
 jenny liao posted on Saturday, May 12, 2012 - 6:11 pm
Hi,
In doing a ML-CFA, Im trying to save a within (sample) and between (sigb) covariance matrix, although after saving it, and using the new file to run it, I get this *** ERROR
Insufficient data in "spw.dat"
I checked the dat file, and the covariance matrix seems to be missing the last 2 values, do you have any clue as to how I might be doing it wrong? Thanks heaps in advance, jenny.
 Linda K. Muthen posted on Sunday, May 13, 2012 - 10:57 am
Please send the relevant files and your license number to support@statmodel.com.
 Melvin C Y posted on Friday, January 04, 2013 - 8:53 pm
Can I use summary data (i.e., covariance matrix) for multilevel analysis? I'm thinking that I might have to enter a within and betwen data? If possible, how would the syntax look like?
Thanks.
 Linda K. Muthen posted on Saturday, January 05, 2013 - 6:31 am
No, you must have individual level data for multilevel analysis.
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: