Message/Author 

Melvin C Y posted on Monday, January 16, 2012  8:00 pm



I would like to specify single latent composite variables with fixed factor loading and error such as the ones below. MODEL: LMEM by MEM@0.8163; MEM@0.1666; LCLT BY CLT@0.7180; CLT@0.2106; LEPT BY EPT@0.9536; EPT@0.2273; ... My question is how do I include them in the model specification in MLCFA. I tried placing them under the MODEL section, followed by the multilevel commands but obtained the error "The labels %BETWEEN% or %WITHIN% must be specified". %between% bcfa by LMEM LCLT LEPT; %within% wcfa by LMEM LCLT LEPT; Thanks, Melvin 


You would need to put the variables LMEM LCLT LEPT on the WITHIN list and create betweenlevel counterparts for them using the CLUSTER_MEAN option of the DEFINE command. Then you can correct the variables for reliability on within and between. 

Melvin C Y posted on Thursday, January 26, 2012  3:07 am



Hi Linda, the syntax based on your comments is below. However, I think I'm still missing something. Would appreciate if you could give me a few pointers on where I might have gone wrong. Thanks!  USEVAR ARE MEM,CLT,EPT BMEM BCLT BEPT !new var defined ; CLUSTER = School; WITHIN ARE MEM,CLT,EPT; MISSING ARE ALL (999); Define: BMEM=cluster_mean(MEM); BCLT=cluster_mean(CLT); BEPT=cluster_mean(EPT); Analysis: TYPE = general twolevel ; MODEL: %between% BCFA by BMEM BCLT BEPT; %within% LMEM by MEM@0.8163; MEM@0.1666; LCLT BY CLT@0.7180; CLT@0.2106; LEPT BY EPT@0.9536; EPT@0.2273; WCFA by LMEM LCLT LEPT;  The error message was: "The number of observations is 0. Check your data and format statement" 


The message has to do with reading the data not the syntax. You may have the variable names on the first record or you have have the wrong number of variable names. If this does not help, please send your output and license number to support@statmodel.com. 

Alex Baron posted on Monday, December 07, 2015  7:58 am



I am trying to specify a latent construct at both levels 1 and 2, but I receive the error following message: "The labels %BETWEEN% or %WITHIN% must be specified". I tried to use the CLUSTER_MEAN function to create a betweenlevel counterpart of the withinlevel latent factor like this: DEFINE: BSR_1 = CLUSTER_MEAN (SR_1) ; BSR_2 = CLUSTER_MEAN (SR_2) ; BSR_3 = CLUSTER_MEAN (SR_3) ; BSR_4 = CLUSTER_MEAN (SR_4) ; However, SR_1  SR_4 are only later defined as latent constructs in the model command, so I cannot put them on the USEVARIABLES list or WITHIN lists without receiving an error. Could you please help me with this problem? Thanks so much. 


See the examples in Chapter 9 of the user's guide to see the the %BETWEEN% and %WITHIN% labels are used in multilevel modeling. Latent variables cannot be referred to in the DEFINE command. Example 9.6 shows a multilevel CFA. 

Alex Baron posted on Thursday, December 17, 2015  5:25 am



Thanks so much, Linda. Your advice helped me to specify a twolevel growth model, but it won't converge: THE ESTIMATED BETWEEN COVARIANCE MATRIX COULD NOT BE INVERTED. COMPUTATION COULD NOT BE COMPLETED IN ITERATION 337. Here's my model: ESTIMATOR = MLR ; STARTS = 500 20 ; STITERATIONS=20 ; MITERATIONS = 10000 ; TYPE = TWOLEVEL ; ALGORITHM=INTEGRATION ; INTEGRATION = 10 ; MODEL: %WITHIN% SR_1 BY CB_t1@1 HTKS_t1 DCCS_t1 PT_t1 (24) ; SR_2 BY CB_t2@1 HTKS_t2 DCCS_t2 PT_t2 (24) ; SR_3 BY CB_t3@1 HTKS_t3 DCCS_t3 PT_t3 (24) ; SR_4 BY CB_t4@1 HTKS_t4 DCCS_t4 PT_t4 (24) ; SR_1*0.05 ; SR_2*0.05 ; SR_3*0.05 ; SR_4*0.05 ; %BETWEEN% BSR_1 BY CB_t1@1 HTKS_t1 DCCS_t1 PT_t1 (24) ; BSR_2 BY CB_t2@1 HTKS_t2 DCCS_t2 PT_t2 (24) ; BSR_3 BY CB_t3@1 HTKS_t3 DCCS_t3 PT_t3 (24) ; BSR_4 BY CB_t4@1 HTKS_t4 DCCS_t4 PT_t4 (24) ; BSR_1*0.05 ; BSR_2*0.05 ; BSR_3*0.05 ; BSR_4*0.05 ; Any idea what's going on? 


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


Hi Dr. Muthen The following codes worked well without a grouplevel predictor. However, when I added CLUSTER_MEAN and TCEXCHAN to my codes, I was getting an error message: *** ERROR The number of observations is 0. Check your data and format statement. It was the same data set that I used in my previous analysis. It did work. The only difference is the addition of a grouplevel variable. Your help will be much appreciated! Selcuk DATA: FILE is "C:\teacherTR.csv"; Format is free; TYPE is individual; listwise is on; DEFINE: EXCHagg = CLUSTER_MEAN (TCEXCHAN); VARIABLE: NAMES are BTG01 TCEXCHAN IDSCHOOL TCHWGT; USEVARIABLES are BTG01 TPSTRUC TCEXCHAN IDSCHOOL TCHWGT EXCHagg; weight = TCHWGT; cluster = IDSCHOOL; within= BTG01; between= EXCHagg; ANALYSIS: TYPE=Twolevel; %Between% TPSTRUC ON EXCHagg; %Within% TPSTRUC ON BTG01; 


An Edit: VARIABLE: NAMES are BTG01 TPSTRUC TCEXCHAN IDSCHOOL TCHWGT; 


Please send the output, data set, and your license number to support@statmodel.com. 

Back to top 