Message/Author 

Edward Mak posted on Sunday, June 08, 2008  8: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 betweengroups covariance matrix and one pooled wtihingroups covariance matrix for inputing into a LISREL program. However, I know that the sample betweengroups covariance matrix equals to the summation of unbiased estimate of population withingroups covariance matrix and a scalar times the population betweengroups covariance matrix. So my questions are: 1. the between level matrix offered by Mplus is the sample betweengroups covariance matrix or the population betweengroups covariance matrix. 2. if the between level matrix offered by Mplus is the population betweengroups covariance matrix, can I get the scalar by Mplus? Thank you very much. 


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 Tuesday, June 10, 2008  12:53 am



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 maximumlikelihood 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 printout "ESTIMATED SAMPLE STATISTICS FOR WITHIIN" = unbiased estimator of the pooled withingroups covatiance? 2. Is the matrix of the printout "ESTIMATED SAMPLE STATISTICS FOR BETWEEN" = unbiased estimator of the betweengroups covatiance, i.e. the E(S_B) of the formula 199 in Technical Appendix 10? Thank you very much. Edward 


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 pooledwithin 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 Thursday, June 19, 2008  4:17 am



Dear Linda, Thank you very much for your great help. Edward 

Utkun Ozdil posted on Thursday, February 10, 2011  7: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 nG; 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 


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 singlelevel analysis (not Type=Twolevel). Analogous for the between analysis. 

Utkun Ozdil posted on Friday, February 11, 2011  6:06 am



Two follow up questions; 1In 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... 


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 singlelevel model in the MODEL command. It may not be the same for both within and between. And for NOBSERVATIONS, you use ng for within and g for between. 


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 singleitem), and on the between level I have those same 4 plus two between factor (1 has 3 indicators, the other is a singleitem). I have managed to successfully run a multilevel CFA using the TWOLEVEL 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 TWOLEVEL 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 crosslevel 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? 


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 Sunday, May 13, 2012  12:11 am



Hi, In doing a MLCFA, 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. 


Please send the relevant files and your license number to support@statmodel.com. 

Melvin C Y posted on Saturday, January 05, 2013  2:53 am



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. 


No, you must have individual level data for multilevel analysis. 

Back to top 