Message/Author 


I am working on a 2level path analysis to study travel behavior of individuals (level 1) within neighborhoods (level 2). The dataset consists of information of singles, so there is no interaction with a householdlevel. This is how I defined the model: DATA: file is C:\single.dat; VARIABLE: names are ...; usevariables are ...; within = age sex driv_lic degree employed car income weekend; between = dist_pt pop road housing com entropy; cluster = neigh; ANALYSIS: TYPE = TWOLEVEL; MODEL: %WITHIN% distance ON age sex driv_lic degree employed car income weekend; time ON distance age sex driv_lic degree employed car income weekend; %BETWEEN% distance on dist_pt pop road housing com entropy; time on distance dist_pt pop road housing com entropy; MODEL INDIRECT: time ON distance age ... However, I get this error: *** ERROR The number of observations is 0. Check your data and format statement. Data file: C:\single.dat *** ERROR Invalid symbol in data file: "age" at record #: 1, field #: 3 I checked the datafile, but I can not find out what goes wrong. Thanking you in advance, Veronique 


It sounds like you have the variable names as the first record of your data file. You need to remove the record that contains the variable names. 


Hi, I am running a twolevel path model (with fixed slopes but random intercepts). I have tried to use different centering options for withinlevel covariates (grand and groupmean centering). I understand that these transformations should affect the intercept values. But my slopes (and their significance) change dramatically as well. How can this be? I have understood that this should not be the case (as I don't have random slopes). 


Grand mean centering will result in the same regression coefficients as no centering because the same value is subtracted from each value of the variable. Group mean centering will result in different regression coefficients because different values are subtracted from each value of the variable depending on the cluster. See Table 5.11 on page 140 of Raudenbush and Bryk shows this. 


Thank you for your quick reply. However, I guess there is still a slight difference in parameters (slope coefficients) when using raw vs. grandmean centered variables. For instance, under no centering: ARITM2 ON READING0(B = 0.016; SE = .027) ARITM2 ON MATH0 (B = 0.031; SE = 0.011) ARITM2 ON AVOID0 (B = 0.104; SE = 0.050) But when I grandmean center, ARITM2 ON READING0(B = 0.059; SE = 0.027) ARITM2 ON MATH0 (B = 0.036; SE = 0.011) ARITM2 ON AVOID0 (B = 0.064; SE = 0.046) What is the reason for that? Also, why does the model fit change? 


There should be no differences. The fit should be the same. If the fit changes, then either you are hitting a local solution in one case or the centering is not the only difference between the two models. For further information, please send the two outputs and your license number to support@statmodel.com. 

Kätlin Peets posted on Tuesday, February 08, 2011  10:11 pm



Hi, I might send my outputs. But I also already checked it and it seems that you are correct about hitting a local solution. It concerns the model where raw scores are used. Thus, I might use grandmean centered scores then. RANDOM STARTS RESULTS RANKED FROM THE BEST TO THE WORST LOGLIKELIHOOD VALUES Final stage loglikelihood values at local maxima, seeds, and initial stage start numbers: 3830.482 unperturbed 0 3831.864 93468 3 3831.864 27071 15 3831.867 259507 53 3831.867 565819 65 3833.319 761633 50 4 perturbed starting value run(s) did not converge. WARNING: THE BEST LOGLIKELIHOOD VALUE WAS NOT REPLICATED. THE SOLUTION MAY NOT BE TRUSTWORTHY DUE TO LOCAL MAXIMA. INCREASE THE NUMBER OF RANDOM STARTS. 

Kätlin Peets posted on Wednesday, February 09, 2011  8:33 pm



I have one more question. When I use raw or grandmean centered predictors that are specified at both levels (within and between), are the betweenlevel effects already contextual effects? That's what I understand from Raudenbush and Bryk. However, in their example, they use an aggregate variable that is observed rather than latent. 


I think this is the case. See the following paper which is available on the website for further information: Lüdtke, O., Marsh, H.W., Robitzsch, A., Trautwein, U., Asparouhov, T., & Muthén, B. (2008). The multilevel latent covariate model: A new, more reliable approach to grouplevel effects in contextual studies. Psychological Methods, 13, 203229. 

Kätlin Peets posted on Thursday, February 10, 2011  7:01 pm



I am still a bit confused. In the user's guide (p. 242), it seems that contextual effects are computed by gamma01  gamma10. This would mean that betweenlevel effects are not directly contextual effects. 


Page 242 talks about the case where you work with a latent x variable. On top of page 243 we state that using a latent x implies latent groupmean centering  so corresponding to the left column of R & B's Table 5.11. With a manifest x, grandmean centering leads to a contextual effect coming out directly as the betweenlevel slope, as in the right column of Table 5.11, and as you said. 

Kätlin Peets posted on Thursday, February 10, 2011  7:57 pm



OK. Thanks a lot. 

Jing Zhang posted on Thursday, May 03, 2012  4:57 pm



I have a crosslevel mediation model or a twolevel path model with: X (independent variable at cluster level) M1 (mediator 1 at individual level) M2 (mediator 2 at individual level) Y (dependent variable at individual level) Can I use the command “IND” to examine the indirect effects from X to Y in this case? I looked into the Mplus forum, notes and other related website of Mplus, it seems to me that “IND” is used with onelevel model only in the examples I have found. Is there a reason that “IND” is not used in a twolevel path model? 


MODEL INDIRECT is available with TYPE=TWOLEVEL. 

Back to top 