[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: xtgee and time
I'm trying to figure out the best way to set up the time variable for -xtgee--.
I'm looking at the relationship between depression diagnosis (yes/no) and the metabolic syndrome (yes/no) over time; the data are collected at baseline and visits 1, 3, and 5 years post-baseline. Both depression and the metabolic syndrome are time-varying. Covariates include age and race. Not everyone attends the visits on the same day. The data are not complete, with some individuals going in and out of the study and others dropping out early. Below is the basic code from which I am working:
For visit as a continuous variable:
--xtgee mscm mjsubdep visit, f(binomial)--
mscm = metabolic syndrome
mjsubdep = depression
My question is: What is the best choice for the time variable? Is it more appropriate to use visit as a continuous or categorical time variable? My understanding is that the use of a categorical time variable may lead to invalid conclusions in datasets with missing data, although I am not sure if it is conceptually accurate to code it as a continuous variable. Alternatively, I have data on the individual's age at baseline and each follow-up visit (although not everyone was the same age upon study entry), and could use this as the indicator of time. Any suggestions would be greatly appreciated.
Thank you in advance for your time and help.
* For searches and help try: