weighted.median(limma)
weighted.median()所属R语言包:limma
Weighted Median
加权中位数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute a weighted median of a numeric vector.
计算出一个数值向量的加权中位数。
用法----------Usage----------
weighted.median(x, w, na.rm = FALSE)
参数----------Arguments----------
参数:x
a numeric vector containing the values whose mean is to be computed.
一个数字值计算其平均值为向量。
参数:w
a vector of weights the same length as x giving the weights to use for each element of x.
相同的长度为x给权使用每个x元素的权重向量。
参数:na.rm
a logical value indicating whether NA values in x should be stripped before the computation proceeds.
一个逻辑值,指明是否NA值x前应计算收益剥离。
Details
详情----------Details----------
If w is missing then all elements of x are given the same weight.
w如果缺少x给出了同样的重量,然后所有元素。
Missing values in w are not handled.
遗漏值在w不处理。
The weighted median is the median of the discrete distribution with values given by x and probabilities given by w/sum(w).
加权中位数是与x和w/sum(w)给定的概率给定值的离散分布的中位数。
值----------Value----------
numeric value giving the weighted median
给予加权中位数的数值
参见----------See Also----------
median, weighted.mean
median,weighted.mean
举例----------Examples----------
## GPA from Siegel 1994[#西格尔协定从1994年]
wt <- c(5, 5, 4, 1)/15
x <- c(3.7,3.3,3.5,2.8)
xm <- weighted.median(x,wt)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|