SAS程序集.doc

上传人:文库蛋蛋多 文档编号:2396075 上传时间:2023-02-17 格式:DOC 页数:6 大小:20KB
返回 下载 相关 举报
SAS程序集.doc_第1页
第1页 / 共6页
SAS程序集.doc_第2页
第2页 / 共6页
SAS程序集.doc_第3页
第3页 / 共6页
SAS程序集.doc_第4页
第4页 / 共6页
SAS程序集.doc_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《SAS程序集.doc》由会员分享,可在线阅读,更多相关《SAS程序集.doc(6页珍藏版)》请在三一办公上搜索。

1、SAS 程序集SAS数据文件的建立1 有连接符例1data ggg;input r c w ;Datalines(CARDS); 1 1 13 1 0 92 2 1 12 2 0 96; run例2data DS;Input g$ n ;do I=1 to n;input x;output;end;cards;control 10548.1 327.1 512.7 238.7 344.8539.2 592.3 689.5 335.9 610.0treats 10751.4 601.1 998.9 831.0 822.1645.3 495.0 698.4 636.5 724.9;run2 无连接

2、符 DATA CHILD; INPUT ID X1$ X2 X3 X4 X5 X6; DATALINES; 1 M 32 95.5 14.0 53.5 49.642 M 35 92.0 13.0 52.0 41.613 M 33 89.0 12.5 53.5 35.814 F 30 91.0 11.0 48.0 35.395 F 33 91.0 11.5 47.0 44.986 F 35 92.4 10.8 49.0 37.42;run一、 一般统计描述1 means过程proc means (选择项) mean std stderr cv min max;var (变量名)e n p;cla

3、ss (by) (变量名) cl;freq (变量名);run;2 univariate过程proc univariate;var e n p;run;3 正态性检验proc univariate data=sasuser.lll normal plot;var e;run;二、 t检验1. two sample t testproc ttest;class sex;var e;run;2. paire sample t testproc means mean std stderr t prt;var d;run;三、 方差分析1. 成组方差分析proc anova;class cl;mode

4、l e=cl;means cl/snk;means cl;run;2. 区组方差分析proc anova;class a b;model e=a b;means a/snk;run;3. 析因方差分析proc anova;class a b c;model e=a b c a*b a*c b*c a*b*c;run;四、 非参数检验proc nparlway wilcoxon (midian)class cl;var e;run;五、 线性相关与分析1. 直线回归分析proc reg;model y=x1 x2 x3/ selection=stepwise sle=0.05 sls=0.1 stb;run;2. 线性相关proc corr nosimple;var e n p;proc corr nosimple;var e n;partial prun;六、 logistic回归proc logistic;model y=x1 x2 x3/ selection=stepwise sle=0.05 sls=0.1 stb;run;七、 卡方检验data a;input x y f ;1 1 30 1 2 15 2 1 20 2 2 35;proc freq;weight f;tables x*y / chisq;run;

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 建筑/施工/环境 > 项目建议


备案号:宁ICP备2025010119号-1

经营许可证:宁B2-20210002

宁公网安备 64010402000987号