s****a 发帖数: 296 | 1 Hello, sorry I cannot type in Chinese here. Please bear with me.
I have a question about analyzing longitudinal data.
Say I have repeated meaurements on both dependent(DV) and independent (IV)
variables.
My data in long-format looks like:
Subject time DV IV Cov1 Cov2
1 0 y10 x10 a10 b10
1 1 y11 x11 a11 b11
1 2 y12 x12 a12 b12
1 3 y13 x13 a13 b13
2 0 y20 x20 a20 b20
2 1 y21 x21 a21 b21
2 2 y22 x22 a22 b22
2 3 y23 x23 a23 b23
3 0 y30 x30 a30 b30
3 1 y31 x31 a31 b31
3 2 y32 x32 a32 b32
3 3 y33 x33 a33 b33
My study question is the relation between IV and the longitudinal change of
DV, adjusting for time-varying covariates Cov1 and Cov2
I know one way of modeling in SAS is:
DV=IV time IV*time Cov1 Cov2
And in this model, each variable has 4 time points(measurements).
However, if I wanna directly model the change of DV as the outcome and the
baseline DV (at time 0) as one of the covariates,
does that mean I have to transpose data to a format like: ?
Subject time DV IV Cov1 Cov2 bl_DV bl_IV bl_Cov1 bl_Cov2
1 1 y11 x11 a11 b11 y10 x10 a10 b10
1 2 y12 x12 a12 b12 y10 x10 a10 b10
1 3 y13 x13 a13 b13 y10 x10 a10 b10
2 1 y21 x21 a21 b21 y20 x20 a20 b20
2 2 y22 x22 a22 b22 y20 x20 a20 b20
2 3 y23 x23 a23 b23 y20 x20 a20 b20
3 1 y31 x31 a31 b31 y30 x30 a30 b30
3 2 y32 x32 a32 b32 y30 x30 a30 b30
3 3 y33 x33 a33 b33 y30 x30 a30 b30
Then how will my model look like in SAS?
If the data should not be transposed like this, how it should be like? And
what's the SAS code then?
Thank you very much. |
r*****y 发帖数: 199 | 2 What SAS procedure are you using? To my knowledge, you can analyze
repeated measure using both GLM and Mixed, each of which requires
different data structure. |
s****a 发帖数: 296 | 3 I use mixed
【在 r*****y 的大作中提到】 : What SAS procedure are you using? To my knowledge, you can analyze : repeated measure using both GLM and Mixed, each of which requires : different data structure.
|
D**g 发帖数: 739 | 4 Are you sure that all the covariates and independent variable are time-
varying? Are those covariates categorical or continuous?
【在 s****a 的大作中提到】 : I use mixed
|
s****a 发帖数: 296 | 5 Yes. All the variables were measured in all time points. Some covariates
were categorical, some were continuous.
【在 D**g 的大作中提到】 : Are you sure that all the covariates and independent variable are time- : varying? Are those covariates categorical or continuous?
|
D**g 发帖数: 739 | 6 I guess you'd better think about how to interpret the results first before
you run the model if you have many time varying things. For example, it
may be ok to run a model with data set as what you transposed, but the
interpretation will be very difficult. You may need to simplify your
analysis. You can read Don Hedecker's book or check his website. http://www.uic.edu/classes/bstt/bstt513/index.html
【在 s****a 的大作中提到】 : Yes. All the variables were measured in all time points. Some covariates : were categorical, some were continuous.
|
z**********i 发帖数: 12276 | 7 http://www.ats.ucla.edu/stat/sas/library/mixedglm.pdf
【在 s****a 的大作中提到】 : Hello, sorry I cannot type in Chinese here. Please bear with me. : I have a question about analyzing longitudinal data. : Say I have repeated meaurements on both dependent(DV) and independent (IV) : variables. : My data in long-format looks like: : Subject time DV IV Cov1 Cov2 : 1 0 y10 x10 a10 b10 : 1 1 y11 x11 a11 b11 : 1 2 y12 x12 a12 b12 : 1 3 y13 x13 a13 b13
|
s****a 发帖数: 296 | 8 看來我還是沒有找到問題的答案。不過還是非常感謝樓上熱心的同學們。 |
s****a 发帖数: 296 | 9 看來我還是沒有找到問題的答案。不過還是非常感謝樓上熱心的同學們。 |