Hi,
Suppose I have the following dataset
id year measure1 measure2
1 2000 0.41 -
1 2001 0.19 0.50
1 2002 0.51 0.75
1 2003 0.91 0.29
2 2000 0.69 -
2 2001 0.40 0.69
2 2002 0.69 0.29 2
2003 0.79 0.39
How would I do a correlation between consecutive years (grouped by id)? e.g. Correlation between measure1 in 2001 with measure1 in 2000, measure1 in 2002 with measure1 in 2001, etc.
Thank you,
Related Posts with Correlations between consecutive observations
Pedroni's Panel Cointegration Tests and Panel Dynamic OLS estimationDear all, I was trying to conduct the Pedroni's Panel Cointegration Tests and Panel Dynamic OLS est…
Blanks in polychoric matrixHi, does any one know the reason why the polychoric matrix often include blank values? Why is the th…
Issue with predictnlDear All, I am going through the paper by Karaka-Mandic, Norton and Down (2012) "Interaction terms …
Renaming Windows directory using Stata syntax?Dear Statalist Is there a way to rename directories on my Windows PC from within Stata? I found how…
Heteroscedasticity and auto correlation in dummy variablesi am calculating CSSDt and Rmt from a cross section data .I calculated the Q1 and Q3 from Rmt to sho…
Subscribe to:
Post Comments (Atom)
0 Response to Correlations between consecutive observations
Post a Comment