在SAS中要算出有序残差与其期望值的相关系数,应该如何编程?
proc reg data=yourdataname;
model y=x1 x2 x3;
plot r.*p.;
output out=outres p=predicted_y r=residuals;
run;proc corr data=outres;
var predicted_y residuals;
run;
但是光凭肉眼看QQ图上点的分布呈不呈一条直线,以此判断正态性心里不踏实。
You can use proc univariate to test the normality of your variable:
proc univarite data=outres normal;
var residuals;
qqplots residual;
histogram residual;
run;
In your SAS output, if the p value of Shapiro-Wilk or D'Agostino-Pearson tests are p<.05, you can say 凭肉眼看QQ图上点的分布不呈一条直线, that is statistically significant, the 'residuals' is not normally distributed.
热心解答他人疑问,给予100现金奖励!
[此贴子已经被eijuhz于2007-2-22 20:17:06编辑过]