打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
偏相关 I 部分相关(半相关)

转自个人微信公众号【Memo_Cleon】的统计学习笔记:偏相关 | 部分相关(半相关)

相关有很多种,我们曾在<<简单相关分析>>一文简单介绍过两个变量间的相关指标。在考察多个变量间的关系时,我们可能会用到偏相关和部分相关。

偏相关(Partial Correlation:是两个变量间的净相关,其他影响这两个变量关系的变量可以称为控制变量。偏相关系数是表示两个变量均剔除控制变量影响后的相关密切程度,等同于将两个变量分别对控制变量的回归残差间的相关系数。偏相关系数的平方表示去掉其他变量的影响后,一个变量可解释的另外一个变量变异的比例。
部分相关(Part correlation:也称半相关(semipartial correlation,是某个变量剔除其他变量的影响后与另外一个变量的相关关系,其平方代表的是变量剔除其他变量的影响后可解释另外一个变量的总变异的比例。

STATA帮助文件


Assume that y is determined by x1, x2, . . . , xk. The partial correlation between y and x1 is an attempt to estimate the correlation that would be observed between y and x1 if the other x’s did not vary. The semipartial correlation, also called part correlation, between y and x1 is an attempt to estimate the correlation that would be observed between y and x1 after the effects of all other x’s are removed from x1 but not from y.

Both squared correlations estimate the proportion of the variance of y that is explained by each predictor. The squared semipartial correlation between y and x1 represents the proportion of variance in y that is explained by x1 only. This squared correlation can also be interpreted as the decrease in the model’s R2 value that results from removing x1 from the full model. Thus one could use the squared semipartial correlations as criteria for model selection. The squared partial correlation between y and x1 represents the proportion of variance in y not associated with any other x’s that is explained by x1. Thus the squared partial correlation gives an estimate of how much of the variance of y not explained by the other x’s is explained by x1

SPSS帮助文件


The partial correlation coefficient removes the linear effects of other predictors from both the predictor and the response. This measure equals the correlation between the residuals from regressing the predictor on the other predictors and the residuals from regressing the response on the other predictors. The squared partial correlation corresponds to the proportion of the variance explained relative to the residual variance of the response remaining after removing the effects of the other variables.The correlation between the response and the residuals from regressing a predictor on the other predictors is the part correlation. Squaring this value yields a measure of the proportion of variance explained relative to the total variance of response.

示例数据同《偏回归图与偏残差图》、《线性回归中的线性考察》。

STATA采用命令pcorr,菜单操作如下:

统计>>汇总,表格和假设检验>>摘要和描述性统计>>偏相关

操作如下。变量类型可设置,本例都是连续变量。

结果如下:心脏面积与心脏纵经偏相关系数为0.799,部分相关系数0.491,具有统计学意义,表明心脏纵径与心脏面积具有相关关系,在模型中去掉心脏纵径会导致模型R2出现明显下降。体重和胸腔横径与心脏面积相关性较弱,都不具有统计学意义。

SPSS[1]

Analyze>>Regression>>Linear…

因变量:心脏面积;自变量:体重、心脏纵经、胸腔横径;

【统计量】选中偏相关和部分相关

结果在线性回归系数表的后半部分,与stata的结果完全一致。

SPSS[2] 

SPSS中有偏相关的过程(Partial)。根据需要控制变量的个数,偏相关系数可以分阶,控制变量个数为一时,偏相关系数称为一阶偏相关系数,控制变量个数为二时,偏相关系数称为二阶相关系数,控制变量个数为为零时,偏相关系数称为零阶偏相关系数,也就是Pearson相关系数。本例实际上是计算控制了体重和胸腔横径的偏相关系数,控制了变量个数为2,相当于二阶偏相关系数。偏相关过程可以计算控制不同变量的多阶偏相关系数,但每次控制其他所有变量时,一次只能计算两个变量的偏相关系数。

Analyze>>Correlate>>Partial…

变量:选入需要计算两个变量;

控制变量选入其他所有变量;

【选项】可以选中0阶相关,显示任意两个变量间的Pearson相关系数,即通过Bivariate过程计算结果。

结果如下:上半部分是任意两个变量间的Pearson相关系数即统计检验结果,下半部分是心脏面积与心脏纵经的偏相关系数及统计检验结果。
心脏面积与体重、胸腔横径的偏相关系数需要再次通过偏相关过程计算。

如果你了解了偏相关系数的计算原理,也可以先计算残差然后在通过Bivariate过程来获得。比如我们可以首先通过体重、胸腔横径与心脏面积进行线性回归获得残差,同样可以获得体重、胸腔横径与心脏纵径的回归残差,然后通过Bivariate过程获得两个残差的相关系数,即心脏面积与心脏纵径的偏相关系数。

Analyze>>Regression>>Linear……

Analyze>>Correlate>>Bivariatel…

转自个人微信公众号【Memo_Cleon】的统计学习笔记:偏相关 | 部分相关(半相关)

… E N D …

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
方程组的解与秩
互助问答第234期:关于相关系数的问题
科学网—确定系数R2与调整确定系数Adj.R2
【统计知识】史上最全的哑变量问题总结
多元线性回归分析
TCGA系列学习笔记(6)多因素生存分析 – sci666
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服