Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • cross lag correlations

    Am conducting analyses to compare treatment and control groups for a repeated measures design with data nested in classrooms. I used xtmixed to look at effects. Someone suggested that I run cross lagged correlations and cannot figure out how to do this with data that is NOT Time Series. Is this possible? If so, how might I do this? I tried the xcorr command but that obviously didn't work since my data are not a Time Series

  • #2
    In order to do this you would need to reshape your data from long form, which it must be in if you are running xtmixed, to wide. If you use the reshape command to get the data into wide form you will have one dependent variable for each time point rather than a single variable and a time indicator and you can then calculate cross-lagged correlations.
    Richard T. Campbell
    Emeritus Professor of Biostatistics and Sociology
    University of Illinois at Chicago

    Comment


    • #3
      From glancing at what Google turns up, "cross lagged correlations" seems to be some sort of analogue of the familiar time series cross-correlogram that's applied to regression coefficients for group × time interaction. Did I get that right? If so, then wouldn't you want to pull the relevant regression coefficients from e(b) into two variables before using xcorr?

      If I didn't get that right, then just what is "cross lagged correlations" when it comes to analysis of data from a split-plot (repeated measures) study design?

      Comment


      • #4
        In early writing on analysis of panel data in the social sciences, the term "cross-lagged correlation" was in common use. See for example: Some linear models for two-wave, two-variable panel analysis.Duncan, Otis D.Psychological Bulletin, Vol 72(3), Sep 1969, 177-182 which discusses the very restrictive assumptions necessary to make sense of such correlations.
        Richard T. Campbell
        Emeritus Professor of Biostatistics and Sociology
        University of Illinois at Chicago

        Comment


        • #5
          Thank you for your suggestions. I reshaped my data to wide form and when I try the xcorr command, I get an error message indicating that I need to set my time variable with the tsset command. I can't seem to figure out how to do this...my code and error messages are below:

          xcorr CKIAccWT1 CKIAccWT2
          time variable not set, use -tsset varname ...-

          T1 and T2 in each variable name above refer to time (T1= time 1; T2= time 2)

          I looked up the syntax for tsset and it is as follows: tsset timvar [ , options] But I can't figure out if/how to do this? Any suggestions


          Comment


          • #6
            You have reshaped your data so that each variable now has a time indicator attached. tsset and xcorr are now irrelevant. All you have to do is:
            Code:
            corr CKIAccWT1 CKIAccWT2
            Richard T. Campbell
            Emeritus Professor of Biostatistics and Sociology
            University of Illinois at Chicago

            Comment

            Working...
            X