I have panel data and want to compute a time series of cross-sectional correlations of two variables, x1 and x2.
So far, my approach has been:
Code:
bysort year: egen correlation = corr(x1 x2)
Any suggestions are highly appreciated!
Best,
John
Specialized on Data processing, Data management Implementation plan, Data Collection tools - electronic and paper base, Data cleaning specifications, Data extraction, Data transformation, Data load, Analytical Datasets, and Data analysis. BJ Data Tech Solutions teaches on design and developing Electronic Data Collection Tools using CSPro, and STATA commands for data manipulation. Setting up Data Management systems using modern data technologies such as Relational Databases, C#, PHP and Android.
bysort year: egen correlation = corr(x1 x2)
0 Response to egen corr() with weights
Post a Comment