Dear Statalisters,
I formerly used -xtmixed- for a repeated measures analysis with Stata 12. I am now using Stata 13, and this command has been replaced by -mixed-, and is described in a separate part of the user manual (ME). However, the XT commands remain for longitudinal/panel data.
I have a new dataset to analyse: we have a cohort of patients, each with one of two types of medical device (A and B), on which a few measurements (X, Y, Z) were made every few months for several years (X,Y,Z are all continuous variables).
So, e.g. for Patient 1 with device A: X,Y and Z measured at t=0, 1, 4, 9, 12, 15 months etc. Patient 2 with device B: X,Y and Z measured at t=0, 1.5, 3, 7, 11, 14. (t=time in months).
We wish to compare the measurements for the two groups (X,Y, and Z in patients with device A vs device B) over time, to see if one type of device is more prone to deterioration/failure.
I planned to compare the variables individually - i.e. compare X in the patients with device A to X in those with device B, and then do the same for Y and Z. I had thought to use the -mixed- command, but after reading the user manual sections on XT (longitudinal data) and ME (mixed effects), I was confused as to whether -mixed- is also suitable for longitudinal data. And I also saw there are the TS (time series) commands...
So my questions are:
1. Is there overlap between XT, ME and TS commands, so that with the correct syntax you could analyse the same problem using alternate commands?
2. With the -mixed- command, as it is a generalised linear model, if there are repeated measures and time is included as a predictive variable, does that make it a longitudinal data command?
e.g.
3. Given measurements were not made at the same times for each patient, would it be best to group measurements into time periods (e.g. 4-6 month, 10-12 months) to standardise the times at which measurements are made for analysis, or can models such as -mixed- work with such variability?
Jem
I formerly used -xtmixed- for a repeated measures analysis with Stata 12. I am now using Stata 13, and this command has been replaced by -mixed-, and is described in a separate part of the user manual (ME). However, the XT commands remain for longitudinal/panel data.
I have a new dataset to analyse: we have a cohort of patients, each with one of two types of medical device (A and B), on which a few measurements (X, Y, Z) were made every few months for several years (X,Y,Z are all continuous variables).
So, e.g. for Patient 1 with device A: X,Y and Z measured at t=0, 1, 4, 9, 12, 15 months etc. Patient 2 with device B: X,Y and Z measured at t=0, 1.5, 3, 7, 11, 14. (t=time in months).
We wish to compare the measurements for the two groups (X,Y, and Z in patients with device A vs device B) over time, to see if one type of device is more prone to deterioration/failure.
I planned to compare the variables individually - i.e. compare X in the patients with device A to X in those with device B, and then do the same for Y and Z. I had thought to use the -mixed- command, but after reading the user manual sections on XT (longitudinal data) and ME (mixed effects), I was confused as to whether -mixed- is also suitable for longitudinal data. And I also saw there are the TS (time series) commands...
So my questions are:
1. Is there overlap between XT, ME and TS commands, so that with the correct syntax you could analyse the same problem using alternate commands?
2. With the -mixed- command, as it is a generalised linear model, if there are repeated measures and time is included as a predictive variable, does that make it a longitudinal data command?
e.g.
Code:
mixed Xvalue month || id: month
3. Given measurements were not made at the same times for each patient, would it be best to group measurements into time periods (e.g. 4-6 month, 10-12 months) to standardise the times at which measurements are made for analysis, or can models such as -mixed- work with such variability?
Jem
Comment