Hi. I'm trying to calculate the Spearman rank correlation for two of my variables namely V and Price.
The problem is that I want to get the correlation for the two variables by year, which ranges from 1963 to 2013.
I've tried the code
I'm getting the correlations by year but they are all separated from each other and it would take too long to copy and paste each and every variable to my table.
Is there a way I can get the correlations nicely in a table in the following manner?
year Observation# Price
1963 x correlation1963
1964 y correlation1964
.......
2013 z correlation2013
Thanks!
The problem is that I want to get the correlation for the two variables by year, which ranges from 1963 to 2013.
I've tried the code
Code:
bys year: spearman Veps Price
Is there a way I can get the correlations nicely in a table in the following manner?
year Observation# Price
1963 x correlation1963
1964 y correlation1964
.......
2013 z correlation2013
Thanks!
Comment