可能重复:
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.)
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包?我们在哪里能找到他们?或者类似的标准化包?
发布于 2011-06-07 17:55:54
如果x
是一个具有原始分数的向量,那么scale(x)
就是一个具有标准化分数的向量。
或者手动:(x-mean(x))/sd(x)
https://stackoverflow.com/questions/6263400
复制相似问题