| 所在主题: | |
| 文件名: Panel data.xls | |
| 资料下载链接地址: https://bbs.pinggu.org/a-1934233.html | |
| 附件大小: | |
|
数据请见附件。用SAS做固定月份效应是这么做吗?
step two 之后,直接做 step four 会报错。提示要保证每个月份里每个股票只能有一个观测值,查 sas support 说可以用 平均值替代多个观测值的方法来做,这样就必须用 step three 来做。 请熟悉这个问题的大侠指教。谢谢! ** Step one; PROC SORT DATA = panal out =a; BY month stock; RUN; ** Step two:delete observations that contains missing variables; data b;set a;nmiss=cmiss(of informedbuy -- ret);if nmiss = 0;run; ** Step three :In order to use PROC PANEL, you need to aggregate the data so that you have unique timevalues within each cross section. One possible way to do this is to run a PROC MEANS on the input data set and compute the mean of all the variables by stock and month, and then use the output data set ; proc means data = bnoprint; where Relationship ^= "本人"; by month stock; var informedbuy -- ret; output out=b(drop= _type__freq_) mean= n=/autoname; run; ** Step four: fixed month effect regression; PROC TSCSREG DATA = aoutest=result noprint; stockmonthstock; modelret =dummy log_size bm r_1y/FIXone; RUN; quit; |
|
熟悉论坛请点击新手指南
|
|
| 下载说明 | |
|
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。 2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。 3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。 (如有侵权,欢迎举报) |
|
京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明