Variable: Names are cnty tcn_vop extfam cimmcon ; USEVARIABLES ARE cnty tcn_vop extfam cimmcon; cluster is cnty; between is cimmcon; categorical is tcn_vop extfam; ANALYSIS: TYPE= twolevel random; Model: %WITHIN% s_b|tcn_vop on extfam; %BETWEEN% [s_b] (bw); extfam on cimmcon (a); tcn_vop on extfam (bb); tcn_vop on cimmcon (cp); s_b with extfam tcn_vop; MODEL CONSTRAINT: new (direct indirect); indirect= a*(bw+bb); direct= cp;
After running the code above, I get the following error. But it seems that I have specified the between and within components as denoted in Hayes' example. Only cimmcon is at level-2 as with the example. Any advice would be greatly appreciated.
*** ERROR in MODEL command Observed variable on the right-hand side of a between-level ON statement must be a BETWEEN variable. Problem with: EXTFAM
You use the extfam variable as a predictor on both within and between by which I think you mean that you want to consider a latent variable decomposition of extfam into a within and a between component. That decomposition, however, is not available when a random slope is defined for the variable (see UG ex 9.2). You can create a cluster-level counterpart by using the Cluster_Mean option.