首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >我可以用R计算z-score吗?

我可以用R计算z-score吗?
EN

Stack Overflow用户
提问于 2011-06-07 17:42:54
回答 1查看 171.8K关注 0票数 32

可能重复:

R, correlation: is there a func that converts a vector of nums to a vector of standard units

通过阅读stackoverflow的评论,我发现z-score可以用Python或perl计算,但我还没有遇到R的任何计算。我错过了吗?可以用R来完成吗?

As (http://en.wikipedia.org/wiki/Standard_score.)

代码语言:javascript
复制
z-score = (x-μ)/σ

x is a raw score to be standardized; 
μ is the mean of the population; 
σ is the standard deviation of the population. 

我相信有专门为此设计的R包?我们在哪里能找到他们?或者类似的标准化包?

EN

回答 1

Stack Overflow用户

发布于 2011-06-07 17:55:54

如果x是一个具有原始分数的向量,那么scale(x)就是一个具有标准化分数的向量。

或者手动:(x-mean(x))/sd(x)

票数 72
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6263400

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档