我可以用 R 计算 z 分数吗?
通过阅读 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.
我相信有为此设计的 R 包?我们在哪里可以找到它们?或者类似的标准化包?
Possible Duplicate:
R, correlation: is there a func that converts a vector of nums to a vector of standard units
By reading stackoverflow's comments, I found z-score maybe calculated with Python or perl, but I did not comes across any for R yet. Did I miss it? Is it possible to be done with 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.
I believe there are R packages designed for this? Where can we found them? Or similar package for normalization?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果
x
是具有原始分数的向量,则scale(x)
是具有标准化分数的向量。或手动:
(x-mean(x))/sd(x)
if
x
is a vector with raw scores thenscale(x)
is a vector with standardized scores.Or manually:
(x-mean(x))/sd(x)