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
Fixed effect with 2 time pointsI would like to examine the effect of the COVID-19 outbreak on social isolation using panel study (d…
creating a new var: Type mismatchHi I am going to classify firms into regions. I have a variable that specifies the firm's locations…
Issue with creating STATA bar graphI have problem to create bar graph with my data. 1st image is my desired graph. 2nd table is my data…
Need help to check out my syntax [Fixed-effect model]I am not familier with STATA, so I need your help checking out my syntax. I would like to examine t…
Need help with creating a new variable based on several conditions pleaseHi all, I'm recently compling a data set that captures data about how car plants affect its surround…
Subscribe to:
Post Comments (Atom)
0 Response to Correlations between consecutive observations
Post a Comment