matlab做kmo检验的代码,KMO检验

谢老师,因子分析的KMO检验我没太懂。计算公式我看的《应用多元统计分析》(李卫东 2008),但是上面写的比较模糊。

另外我从国外的网上下了一个计算KMO的函数文件,现分享出来,因为似乎有很多人需要这个代码:

function [A,B] = kmo(X)

%KMO Kaiser-Meyer-Olkin Measure of Sampling Adequacy.

% Factor analysis can be used as a guide to how coherently a set of variables

% relate to a hypothesized underlying dimension that they are all being used

% to measure. External validity analysis assesses whether the scale that has

% been constructed performs as theoretically expected in correlation with

% other variables to which it is expected to be related.

% There are some assumptions about the characteristics of factors that are

% extracted and defined that are unobserved common dimensions that may be

% listed to account for the correlations among observed variables. Sampling

% adequacy predicts if data are likely to factor well, based on correlation

% and partial correlation. Is used to assess which variables to drop from the

% model because they are too multicollinear.

% It has been suggested that inv(R) should be a near-diagonal matrix in order

% to successfully fit a factor analysis model.  To assess how close inv(R)

% is to a diagonal matrix, Kaiser (1970) proposed a measure of sampling

% adequacy, now called KMO (Kaiser-Meyer-Olkin) index. The common part, called

% the image of a variable, is defined as that part which is predictable by

% regressing each variable on all other variables.

% The anti-image is the specific part of the variable that cannot be predicted.

% Examining the anti-image of the correlation matrix. That is the negative of the

% partial correlations, partialling out all other va

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值