楼主: fzdream
4049 7

请问sas的iml里面可以求skewness之类的? [推广有奖]

  • 0关注
  • 0粉丝

已卖:75份资源

本科生

13%

还不是VIP/贵宾

-

威望
0
论坛币
176 个
通用积分
0
学术水平
0 点
热心指数
1 点
信用等级
0 点
经验
512 点
帖子
41
精华
0
在线时间
38 小时
注册时间
2009-9-28
最后登录
2013-5-17

楼主
fzdream 发表于 2011-6-12 10:08:01 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
请问sas的iml里面可以求skewness之类的?还有kurtosis之类的函数,这怎么用函数呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:skewness sas的 Skew ESS Kurtosis SAS skewness iml

回帖推荐

bobguy 发表于3楼  查看完整内容

You can write the formula yourself as below for the skewness. I leave the kurtosis for you. proc iml; n=5; a=t(1:n); a={1,1,2,2,3}; am=a[:]; avar= ssq(a-am) /( n-1) ; astd=sqrt(avar); askew = ( ( ( (a-am) /astd )##3 ) [+] ) * (n/((n-1)*(n-2))); print am astd avar askew; create a from a; append from a; quit; proc means data=a mean std var skew; var col1; run;

本帖被以下文库推荐

沙发
fzdream 发表于 2011-6-12 23:33:23
顶起
顶起顶起顶起

藤椅
bobguy 发表于 2011-6-13 10:22:57
fzdream 发表于 2011-6-12 10:08
请问sas的iml里面可以求skewness之类的?还有kurtosis之类的函数,这怎么用函数呢?
You can write the formula yourself as below for the skewness. I leave the kurtosis for you.


proc iml;
n=
5;
a=t(
1:n);
a={
1,1,2,2,3};
am=a[:];
avar= ssq(a-am) /( n-
1) ;
astd=sqrt(avar);
askew = ( ( ( (a-am) /astd )##
3 ) [+] ) * (n/((n-1)*(n-2)));
print am astd avar askew;
create a from a;
append from a;
quit;
proc means data=a mean std var skew;
var col1;
run;
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

板凳
fzdream 发表于 2011-6-14 01:23:23
这些我都会写,自己也矩阵输出这类值以及jbtest,以及各自的p-value,都比较简单。就是比较麻烦而已,想问问有无直接可以call的函数命令 3# bobguy

报纸
bobguy 发表于 2011-6-14 10:32:11
fzdream 发表于 2011-6-14 01:23
这些我都会写,自己也矩阵输出这类值以及jbtest,以及各自的p-value,都比较简单。就是比较麻烦而已,想问问有无直接可以call的函数命令 3# bobguy
I don't think there is any existing function call.

地板
fzdream 发表于 2011-6-14 11:37:29
thanks。我在一个iml书里看到了有function列表,但是没有提出如何call。那正常sas求这些东西应该比较麻烦了吧?by the way,你用sas可以直接求acf,pacf的显著性么?用barlett或者bjung box之类。 5# bobguy

7
yunqingwang 在职认证  发表于 2011-7-7 13:16:04
3# bobguy
正解,sas的求偏度和峰度系数的公式和有些教科书的公式有点区别的

8
bobguy 发表于 2011-7-8 11:32:00
fzdream 发表于 2011-6-14 11:37
thanks。我在一个iml书里看到了有function列表,但是没有提出如何call。那正常sas求这些东西应该比较麻烦了吧?by the way,你用sas可以直接求acf,pacf的显著性么?用barlett或者bjung box之类。 5# bobguy
In sas 9.2 IML, you can have a submit block in which you can call many SAS procedures. You really don't need to invent the wheel by yourself.  You may find all your topics in proc arima.

Here is an example,


proc iml;
call randseed(123);
   x = j(100,1, .);
   call randgen(x,'normal');
   create dsnx from x;
   append from x;
   close dsnx;
  
DSName='dsnx';
submit DSName ;
proc univariate data=&DSName;
   var col1;
   ods output Moments=Moments;
run;
endsubmit;
   use Moments;
   read all var {"nValue1"} into m;
   read all var {"nValue2"} into m2;
   close Moments;
   print  m m2;
quit;

proc means data=dsnx n mean std skew kurt;
var col1;
run;

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-8 01:39