通过阅读stackoverflow的评论,我发现z-score可能是用Python或perl计算的,但我还没有看到任何R.我错过了吗?是否可以用R完成?
如(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.
Run Code Online (Sandbox Code Playgroud)
我相信有为此设计的R套餐?我们在哪里找到它们?或类似的规范化包?
Sac*_*amp 56
如果x是具有原始分数的向量,则scale(x)是具有标准化分数的向量.
或手动: (x-mean(x))/sd(x)