Prev: if you run into problems with Spectre....
Next: PROC EXPORT error "DBMS type EXCEL2000 not valid for export"
From: Dale McLerran on 20 Mar 2007 12:42 --- SR <learnsassam(a)YAHOO.COM> wrote: > I want to analyze longitudinal data in which the predictor is > measured at > time T and response is measured at time T+1. I have the predictors > measured longitudinally at unevenly spaced time points and have one > year > lag between predictor and response. Sample size is close to 300. > > The study design is like this. > At years 3, 6, 8, 9 I have the predictors measured along with other > covariates. At years 4,7,9,10 I have the response measured along with > covariates(covariates are measured every year: 3,4,6,7,8,9,10). Both > predictor and response are continuous. > > I am looking for time-lag models for such longitudinal data that SAS > can > handle. Does anybody know of such models ? > > Thanks in Advance. > > SR > SR, If this post is in response to David Cassell's reply, then I think you are really just repeating yourself. What distinguishes the predictor variable that is measured at time T from any other sort of predictor variable other than that you have stated that the predictor at time T is not measured contemporaneously with the response? Really, it seems from here that you have a response variable which is measured at four time points for each subject. You also have a predictor measured one year prior to each of your response measures along with some covariates which are measured at predictor and response variable collection times. (How do you expect to use covariates from each time frame?) For the mean model, it really does not matter a hill of beans whether the predictor variable is measured at the same time as the response or a year prior to the response. What matters is the residual covariance structure which arises when you fit the mean model. You have stated that the time frame is consistent across all subjects (every subject has response measured in years 4, 7, 9, and 10). Because the response is measured over a consistent grid, the residual covariance structure should be identical across all of your subjects. Note, though, that we might expect that the covariance structure could depend on the distance between measurement periods. Since the residual covariance structure can (and must) be assumed identical for all subjects, then an UNstructured covariance structure (using the terminology of the MIXED procedure) is certainly not a wrong residual covariance structure. The unstructured covariance would require estimation of 10 parameters in the residual covariance matrix. You might have a more efficient model if you were to fit a spatial-type covariance structure where you assume that the residual variance at each of your four measurement periods is identical and the covariance between the residual at two different time points depends only on the length time between those two observations. Just to be really concrete, below is a code skeleton for fitting an unstructured covariance structure as well as one type of spatial covariance model. /* Unstructured residual covariance model */ proc mixed data=mydata; class subj_ID <categorical covariates>; model response = predictor <covariates> / s; repeated time / subject=subj_ID type=UN; run; /* Spatial covariance structure for residuals */ proc mixed data=mydata; class subj_ID <categorical covariates>; model response = predictor <covariates> / s; repeated / subject=subj_ID type=sp(pow)(time); run; Dale --------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra(a)NO_SPAMfhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 --------------------------------------- ____________________________________________________________________________________ Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121
From: SR on 20 Mar 2007 15:49 Thank you, Dale. That helps. To answer your questions: I want to adjust for the covariates that are measured at time T (at which the Predictor of interest is also measured) in order to say that any significant effect of the predictor found can have a causal interpretation. In this regard, I imagine I should use time-dependent covariates. Am I right? Does PROC MIXED handle time-dependent covariates(both categorical and continuous)? Thanks again. SR.
From: Dale McLerran on 20 Mar 2007 19:01
--- SR <learnsassam(a)YAHOO.COM> wrote: > Thank you, Dale. That helps. To answer your questions: I want to > adjust for > the covariates that are measured at time T (at which the Predictor of > interest is also measured) in order to say that any significant > effect of > the predictor found can have a causal interpretation. In this regard, > I > imagine I should use time-dependent covariates. Am I right? Does PROC > MIXED > handle time-dependent covariates(both categorical and continuous)? > > Thanks again. > > SR. > SR, Yes, the MIXED procedure easily deals with time-dependent covariates. You need to appropriately structure your data with four observations per subject, with each observation being the response and predictor set at each of your four measurement periods as shown below: subj_ID time response pred x1 x2 ... 1 4 18 16 2 3 ... 1 7 13 12 3 5 ... 1 9 14 10 3 4 ... 1 10 12 9 4 3 ... 2 4 ... 2 7 ... 2 9 ... 2 10 ... ... Given this structure for your data, you can fit either of the models which I specified previously. You will observe that the predictor variables are indeed different at each of the four measurement periods. The MIXED procedure uses the row-specific values to predict the row-specific response. The first column which specifies a subject ID value is used to determine which observations are correlated because they are from the same respondent. The REPEATED statement in my previous response specifies exactly how to model the within-subject covariance structure. Dale --------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: dmclerra(a)NO_SPAMfhcrc.org Ph: (206) 667-2926 Fax: (206) 667-5977 --------------------------------------- ____________________________________________________________________________________ Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 |