Hello,
I'm working with a dataset in the LONG shape to do some longitudinal analysis. The analysis of interest is the multilevel, because it can consider the repeated measures dependency (paired data) and the envirnonment in the model. So I have three levels in my model (observations, individuals, census tract). Well, I observed that there was some individuals who moved from one census tract to another between the period of the study, so I found that I can't use the traditional nested model, and have to use the crossed model that can consider this characteristic of change.
Can someone help me about the syntax of this kind of model?
Here is the exemple of my data set:
id time census_t sex age education outcome
100600311 1 1006 2 58.43394934976044 2 1
100600311 2 1006 2 63.62217659137577 3 1
100600511 1 1006 1 56.139630390143736 3 0
100600511 2 1006 1 61.42915811088296 3 0
100600811 1 1006 2 28.95003422313484 3 .
100600811 2 1032 2 34.7460643394935 3 1
100601211 1 1006 2 81.056810403833 1 0
100601211 2 1006 2 86.65571526351813 1 0
100604312 1 1006 1 38.965092402464066 2 0
100604312 2 1006 1 44.2984257357974 3 1
100604811 1 1006 2 68.70636550308008 1 1
100604811 2 1006 2 74.03422313483915 1 1
100604911 1 1006 1 30.17932922655715 2 1
100604911 2 1006 1 35.43052703627652 3 1
100604912 1 1006 2 26.38740588637919 2 1
100604912 2 1006 2 31.668720054757017 3 1
202500911 1 2025 1 57.97672826830938 3 0
202500911 2 2025 1 64.03559206023272 3 0
202501011 1 2025 2 56.42436687200548 4 0
202501011 2 2025 2 62.40109514031485 4 1
202501612 1 2025 1 62.29158110882957 4 1
202501612 2 22278 1 68.34770704996578 4 1
I'm working with a dataset in the LONG shape to do some longitudinal analysis. The analysis of interest is the multilevel, because it can consider the repeated measures dependency (paired data) and the envirnonment in the model. So I have three levels in my model (observations, individuals, census tract). Well, I observed that there was some individuals who moved from one census tract to another between the period of the study, so I found that I can't use the traditional nested model, and have to use the crossed model that can consider this characteristic of change.
Can someone help me about the syntax of this kind of model?
Here is the exemple of my data set:
id time census_t sex age education outcome
100600311 1 1006 2 58.43394934976044 2 1
100600311 2 1006 2 63.62217659137577 3 1
100600511 1 1006 1 56.139630390143736 3 0
100600511 2 1006 1 61.42915811088296 3 0
100600811 1 1006 2 28.95003422313484 3 .
100600811 2 1032 2 34.7460643394935 3 1
100601211 1 1006 2 81.056810403833 1 0
100601211 2 1006 2 86.65571526351813 1 0
100604312 1 1006 1 38.965092402464066 2 0
100604312 2 1006 1 44.2984257357974 3 1
100604811 1 1006 2 68.70636550308008 1 1
100604811 2 1006 2 74.03422313483915 1 1
100604911 1 1006 1 30.17932922655715 2 1
100604911 2 1006 1 35.43052703627652 3 1
100604912 1 1006 2 26.38740588637919 2 1
100604912 2 1006 2 31.668720054757017 3 1
202500911 1 2025 1 57.97672826830938 3 0
202500911 2 2025 1 64.03559206023272 3 0
202501011 1 2025 2 56.42436687200548 4 0
202501011 2 2025 2 62.40109514031485 4 1
202501612 1 2025 1 62.29158110882957 4 1
202501612 2 22278 1 68.34770704996578 4 1
Comment