R 中置信区间的 PCA 和 Hotelling T^2 [英] PCA and Hotelling's T^2 for confidence intervall in R

查看:61
本文介绍了R 中置信区间的 PCA 和 Hotelling T^2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一个主成分分析,取了前两个主成分.我根据 2 PC 的分数制作了我的分数图表.我想在此图上添加一个与 Hotelling 的 T^2 检验相对应的 95% 置信区域,以检测椭圆外的点(异常值)在 R 中怎么可能?你有什么例子吗?

I made a principal component analysis and took the 2 first principal components. I made a chart of my points based on the score of the 2 PC. I would like to add on this graph a 95% confidence region corresponding to the Hotelling's T^2 test in order to detect the points that are out of the ellipse (outliers) How is it possible in R? Do you have any example?

我会做这样的事情并检测椭圆中的点:

I would do something like this and detect the points out of the ellipse:

推荐答案

pcaMethods 包有一个 function simpleEllipse(x, y, alpha, len) 可以做到这一点.给定两个不相关的数据向量,它将返回一个椭圆,其中轴根据每个分数的方差和 F 统计量进行缩放.

The pcaMethods package has a function simpleEllipse(x, y, alpha, len) that will do this. Given two uncorrelated data vectors it will return an ellipse, where the axes are scaled based on the variance of each score, and the F statistic.

这篇关于R 中置信区间的 PCA 和 Hotelling T^2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆