转自个人微信公众号【Memo_Cleon】的统计学习笔记:偏相关 | 部分相关(半相关)。
相关有很多种,我们曾在<<简单相关分析>>一文简单介绍过两个变量间的相关指标。在考察多个变量间的关系时,我们可能会用到偏相关和部分相关。
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.
示例数据同《偏回归图与偏残差图》、《线性回归中的线性考察》。
统计>>汇总,表格和假设检验>>摘要和描述性统计>>偏相关
操作如下。变量类型可设置,本例都是连续变量。
Analyze>>Regression>>Linear…
因变量:心脏面积;自变量:体重、心脏纵经、胸腔横径;
【统计量】选中偏相关和部分相关
结果在线性回归系数表的后半部分,与stata的结果完全一致。
SPSS中有偏相关的过程(Partial)。根据需要控制变量的个数,偏相关系数可以分阶,控制变量个数为一时,偏相关系数称为一阶偏相关系数,控制变量个数为二时,偏相关系数称为二阶相关系数,控制变量个数为为零时,偏相关系数称为零阶偏相关系数,也就是Pearson相关系数。本例实际上是计算控制了体重和胸腔横径的偏相关系数,控制了变量个数为2,相当于二阶偏相关系数。偏相关过程可以计算控制不同变量的多阶偏相关系数,但每次控制其他所有变量时,一次只能计算两个变量的偏相关系数。
变量:选入需要计算两个变量;
控制变量选入其他所有变量;
【选项】可以选中0阶相关,显示任意两个变量间的Pearson相关系数,即通过Bivariate过程计算结果。
Analyze>>Regression>>Linear……
Analyze>>Correlate>>Bivariatel…
转自个人微信公众号【Memo_Cleon】的统计学习笔记:偏相关 | 部分相关(半相关)。
… E N D …
联系客服