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
Spost13 problems...dear stata users i am runing prvalue and prchange after logit model. (Stata 15.1 is used) i have up…
outreg2 working for one but not another modelHi, I am using outreg 2 for exporting results. It is giving me the desired excel file in these case…
outreg2 working for one but not another modelHi, I am using outreg 2 for exporting results. It is giving me the desired excel file in these case…
Obtaining the standardized coefficients to a regression table using Outreg2.I have a simple regression that I would want to report standardized coefficients too. I run; Code:…
Extracting part of a string variableHi. I have a string variable that comprises of multiple words with no fixed order/that is not the sa…
Subscribe to:
Post Comments (Atom)
0 Response to Correlations between consecutive observations
Post a Comment