e****o 发帖数: 690 | 1 in a simulation, I have x1 and x2 observations each person in each year, how
to get a person’s change in x1 and the change in x2, with five-year
rolling window. My step is to get their correlation of change in x1 and
change in x2, using current year and past four years' observations.
Anyone can help? Many thanks.
****************** CODE begin ****************** ;
data corr;
do id= 1 to 30;
group = 10;
do year = 2000 to 2015;
x1 = abs(log(abs(uniform(8)+sqrt(year)/gvkey*rannor(8))));
x2 = abs( |
|