楼主: 3qsir
984 2

[实际应用] the code really can run ? [推广有奖]

  • 2关注
  • 1粉丝

副教授

52%

还不是VIP/贵宾

-

威望
0
论坛币
13606 个
通用积分
27.0809
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
71836 点
帖子
367
精华
0
在线时间
931 小时
注册时间
2011-5-18
最后登录
2021-3-6

楼主
3qsir 发表于 2014-3-11 19:18:47 |AI写论文
30论坛币

这个程序代码真的的可执行吗?
可否举个例子来测试一下?
他应用在哪里?

proc corr nocorr cov data=monthly;


  var mk mb ml;


run;


quit;


* compute statistic;


porc iml;


  * factor samplevariance-covariance matrilx;


  use omega;


  read all var {mk mb ml} intoomegah;


  * residual samplevariance-covariance matrix;


  * note; sigme comes from theOUTS= option of the FIT;


  *     statement in PROC MODEL;


  use sigma;


  read all var {s1b1 s1b2 s1b3s1b4 s1b5


s2b1 s2b2s2b3 s2be s2b5


s3b1 s3b2s3b3 s3b4 s3b5


s4b1 s4b2s4b3 s4b4 s4b5


s5b1 s5b2s5b3 s5b4 s5b5} into sigmah;


  * factor means;


  use stats;


  read all var {mean} intofbar;


  * intercept estimates andnumber of observations;


  use est1;


  read all var {a11 a12 a13a14 a15


a21 a22 a23a24 a25


a31 a32 a33a34 a35


a41 a42 a43a44 a45


a51 a52 a53a54 a55} into bo;


read all var{_NUSED_} into t;


* N = numberof assets (portfolios);


* K = numberof factors (e.g., 3 for MK, MB, and ML);


* T = numberof observations


N = 25;


K = 3;


iomega =inv(omegah);


isigma =inv(sigmah);


W = ((1 +fbar * iomega*fbar)**-1)*bo*isigma*bo;


F = (T/M)*((T-N-K)/(T-K-1)*W;


df1 = N;


df2 = T-N-K;


pvalue = 1 –probf (F, df1, df2);


print Fpvalue;


quit;


关键词:really Real code COD The really

沙发
intheangel 学生认证  发表于 2014-3-11 19:53:40
这个不肯能能够执行吧,我能看懂的是你先求了一个3变量的协方差矩阵,然后用矩阵模块算了一个检验量来做F检验,F检验我最熟悉的是用来做方差分析,但是你的矩阵模块里的数据不知道哪个是协方差阵哪个是相关阵哪个是系数阵,也不知道这说的数据是哪里来的,而且算式里面的括号都不是对称的,真心猜不出来
我是一只瘦瘦的小猪~~~
╭︿︿︿╮
{/-◎◎-/}
( (oo) )
  ︶︶︶

藤椅
3qsir 发表于 2014-3-11 22:41:48
我真的从头到尾看都不懂更别说经济意含
(寻求具有强大计量理论背景的SAS人来解答)

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-30 00:36