天天看点

SAS统计分析基础

用于一般统计描述---Proc mean 过程

详细统计描述过程---proc univariate 过程

正态性检验 proc univariate normal; nvar x; run;

两均数的比较(t.test):一般用proc ttest; class 分组变量;var x; run;

多个样本均数的比较(ANOVA):一般用proc ANOVA;class 分组变量;model X=分组变量;

多个样本率的比较(卡方检验):一般用proc freq; tables r*c/chisq; run;

直线回归与相关

回归:proc reg; model y=x;run;

多重线性回归:model y=x1 x2 ...; run;

相关:proc corr; var x y; run;

秩和检验:一般用proc npar1way wilcoxon; class 分组变量;var x;run;

Logistic 回归:Proc logistic descending;model y=x1 x2;run;

生存分析:生存率估计及logrank-test:Proc lifetest plots=(s);time 时间*状态(1);*1指生存定义

strata 分组变量;

Run;

COX回归:Proc phreg; model 时间*状态(1)=x1 x2.../risklimits;run;

继续阅读