现在的位置: 首页 > 综合 > 正文

相关系数

2018年10月22日 ⁄ 综合 ⁄ 共 443字 ⁄ 字号 评论关闭

http://blog.renren.com/blog/220869953/728359353?from=fanyeNew

1.Pearson相关系数

proc corr data=sashelp.class pearson cov;
   var age height weight;
   with height weight;
run;

2.偏相关系数

proc reg data=sashelp.class;
    model height=weight /pcorr1  pcorr2;
quit;

结果:Squared Partial Corr Type I II:0.77

proc corr data=sashelp.class;
   var height weight;
   partial age;
run;

结果:Partial Correlation 0.70

proc glm data=sashelp.class;
   model weight height = ;
   manova /printe;
run;
结果:Partial Correlation 0.88 

抱歉!评论已关闭.