最终想得到的结果是,以第一个id 22的vol为被解释变量y,以第二个id 153 和第三个id 521的vol为解释变量x1 和 x2做多元回归。其中,三个变量的date不同,需选取公共时间。谢谢解答~
- * Example generated by -dataex-. To install: ssc install dataex
- clear
- input int id str10 date float vol
- 22 "2016-03-21" .052813
- 22 "2016-03-22" .052454
- 22 "2016-03-23" .052408
- 22 "2016-03-24" .047639
- 22 "2016-03-25" .04712
- 22 "2016-03-28" .045522
- 22 "2016-03-29" .044819
- 22 "2016-03-30" .043843
- 22 "2016-03-31" .043505
- 22 "2016-04-01" .037377
- 22 "2016-04-05" .034572
- 22 "2016-04-06" .031845
- 22 "2016-04-07" .02941
- 22 "2016-04-08" .029335
- 22 "2016-04-11" .028991
- 22 "2016-04-12" .024011
- 22 "2016-04-13" .024352
- 22 "2016-04-14" .022763
- 22 "2016-04-15" .021754
- 22 "2016-04-18" .020897
- 22 "2016-04-19" .020582
- 22 "2016-04-20" .024134
- 22 "2016-04-21" .02426
- 22 "2016-04-22" .023183
- 22 "2016-04-25" .023225
- 22 "2016-04-26" .023121
- 22 "2016-04-27" .022679
- 22 "2016-04-28" .021752
- 22 "2016-04-29" .021645
- 153 "2016-04-22" .04837
- 153 "2016-04-25" .050336
- 153 "2016-04-26" .050088
- 153 "2016-04-27" .043589
- 153 "2016-04-28" .042855
- 153 "2016-04-29" .037977
- 521 "2016-03-30" .037602
- 521 "2016-03-31" .03761
- 521 "2016-04-01" .037194
- 521 "2016-04-05" .03
- 521 "2016-04-06" .027106
- 521 "2016-04-07" .023832
- 521 "2016-04-08" .02347
- 521 "2016-04-11" .023977
- 521 "2016-04-12" .02307
- 521 "2016-04-13" .022991
- 521 "2016-04-14" .022344
- 521 "2016-04-15" .02168
- 521 "2016-04-18" .020972
- 521 "2016-04-19" .021193
- 521 "2016-04-20" .020905
- 521 "2016-04-21" .020619
- 521 "2016-04-22" .019372
- 521 "2016-04-25" .020068
- 521 "2016-04-26" .02062
- 521 "2016-04-27" .019568
- 521 "2016-04-28" .018638
- 521 "2016-04-29" .019036
- end
复制代码