

Time Series Growth Model with Autocor... 

Message/Author 


How would I specify a model for a random intercept and slope growth model of timeseries data, where I expect there to be autocorrelation? For example I have 100 participants who completed daily measures of stress over 3 weeks during a potentially stress inducing period. But I expect some autocorrelation between daily measures. I want to be able to extract the factor scores for use in later analyses. Thanks 


See the Smoking urge example in the DSEM handout by me on our home page. Factor scores can be plotted and can be saved. Stay tuned for the Hopkins videos if you can't attend. 


Thanks Bengt, appreciate these responses. I have watched all the DSEM videos on the site  which have been a great help  but as a beginner I think I sometimes miss the obvious! I will keep my eye out for the JHopkins talks. So based on the smoking urge example I tried the following: USEVARIABLES ARE ID PA Pregnant Yrs_Inf AGE Attempts time; WITHIN = time; BETWEEN = Yrs_Inf AGE Attempts Pregnant; CATEGORICAL = Pregnant; CLUSTER = ID; LAGGED = PA(1); ANALYSIS: TYPE = TWOLEVEL RANDOM; ESTIMATOR = BAYES; PROCESSORS = 2; BITERATIONS = (2000); MODEL: %WITHIN% auto  PA ON PA&1; IIV  PA; PAgwth  PA ON time; %BETWEEN% Pregnant ON PA PAgwth auto IIV Yrs_Inf AGE Attempts; PA auto iiv PAgwth ON Yrs_Inf AGE Attempts; PA auto IIV PAgwth WITH PA auto IIV PAgwth; However I get the following error: THE MODEL ESTIMATION DID NOT TERMINATE NORMALLY. THE ESTIMATED BETWEEN LEVEL POSTERIOR VARIANCE COVARIANCE MATRIX IS NOT POSITIVE DEFINITE AS IT SHOULD BE. THE PROBLEM MAY BE RESOLVED BY INCREASING THE VARIANCE OPTION. THE PROBLEM OCCURRED IN CHAIN 1. 


Hmmm. Your input looks right. I wonder if you see a variance that is close to zero. Or, asking for TECH4 is you see a correlation close to 1. If you haven't already, try first without Pregnant. Otherwise, send input, output, and data to Support along with your license number. 


We are using syntax provided by a colleague as an example of latent trajectory analysis. We understand everything in the syntax except two things, which I think have to do with autocorrelation in some way. We are unable to reach the colleague for clarification. The purpose of the model is to understand changes in a variable leading up to, and then following, a major life event. In the syntax below "xm18" would mean the wave 18 measurement waves prior to the event; "x18" would mean the wave 18 waves after. First, why set the path from a variable x[t] to x[t+1] (e.g., x18 ON x17@1) to one, as opposed to estimating x[t] to arrive at the variance in x[t+1] that is not related to x[t]? Second, regardless of setting vs estimating, why would one regress the earlier time point on the later time point (e.g., xm18 ON xm17) since xm18 is measured BEFORE xm17? This is done for all the waves before the event, but after the event the regressions are set up in the intuitive (to us at least) way. SYNTAX !Fix paths from x[t] to x[t+1] at 1 xm18 ON xm17@1; xm17 ON xm16@1; ..... xm2 ON xm1@1; Index Event x2 ON x1@1; ..... x17 ON x16@1; x18 ON x17@1; 


I don't understand what this input is attempting. Perhaps if we saw the whole input  if you like, you can send it to Support along with your license number. 

Back to top 

