|
Message/Author |
|
|
I want to do the kind of analysis that is in ex 9.16. However, my data is already in LONG form and already has ID and repetition variables. How can I let Mplus know about those variables without doing the WIDETOLONG transformation and having Mplus construct them as I do not need it to do so? When I simply choose cluster and within variables using the variables already in the data set, I get the error that there is variation within clusters. I suspect this is because it is not understanding that we've got repeated measures. So I suppose the problem is not with the ID variable but with picking out the repetition variable that I already have in the data set. Again, I do not need Mplus to construct this variable. I just need Mplus to recognize that there is a special (repetition) variable in the data set and that the data is already in LONG format. Alternatively, I would be happy to do the analysis at a single level with time as a covariate but the RANDOM analysis option seems to work better with TWOLEVELS than not. I do not know why. But perhaps that's a question for another day. I appreciate any help. |
|
|
Use the MODEL command from Example 9.16. The NAMES statement for the long format data set used in Example 9.16 is: NAMES ARE person y time a3 x1 x2; Example 3.9 shows a single-level analysis with a random slope. |
|
|
Thank you for your quick response. Unfortunately, I am getting the same error. data: file = merged-251-1.csv; variable: names = person X ZM OM DM F time; usevariables = person X ZM OM F time; within = ZM time; between = F X; cluster = person; define: time = time/50; analysis: type = twolevel; model: %WITHIN% OM ON ZM time; %BETWEEN% OM ON F X; *** ERROR One or more between-level variables have variation within a cluster for one or more clusters. Check your data and format statement. Between Cluster ID with variation in this variable Variable (only one cluster ID will be listed) X 10 F 10 |
|
|
Please send the data set, output, and your license number to support@statmodel.com. VAriables on the BETWEEN list should have the same value for each cluster member. |
|
Back to top |
|
|