Hello,
I want to calculate a covariance/ correlation between two variables within a group in stata.
May data is the following:
For each c_pairs, I want to calculate a covariance/ corralation between prior_date and prox.
Could someone help me to do that?
Thanks
I want to calculate a covariance/ correlation between two variables within a group in stata.
May data is the following:
prior_date | c_pairs | prox |
1980 | BE-NL | 0.576022 |
1980 | BE-IT | 0.711139 |
1980 | BE-GB | 0.255543 |
1980 | BE-FR | 0.257338 |
1980 | BE-US | 0.07187 |
1980 | AT-BE | 0.799441 |
1980 | BE-OTHERS | 0.69717 |
1980 | BE-DK | 0.585538 |
1980 | BE-DE | 0.076019 |
1980 | BE-SE | 0.686572 |
Could someone help me to do that?
Thanks
Comment