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
Confidence Intervals on the Means from a 1-way ANOVA AnalysisIf I am completing a 1-way ANOVA (command: oneway outcomevariable independentvariable) and am lookin…
Variable lag based on other variable.At the moment I am trying to calculate returns however I am attempting to calculate annual returns b…
Categorizing likert-scaleHallo fellow stata users? its my first encounter with stata for my master's project analysis. Am loo…
Replacing variable values using data from other rows within clusterHi (Apologies for the clumsy title, I couldn't think of a better description) I am working with a …
ModellingHae guys,do i have to do multivariate modelling if all my bivariates odds ratios are not significant…
Subscribe to:
Post Comments (Atom)
0 Response to Correlations between consecutive observations
Post a Comment