weighting(les)
weighting()所属R语言包:les
Weighting functions
加权函数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Set of functions to compute spatial weights between probes.
设置功能来计算探针之间的空间权重。
用法----------Usage----------
triangWeight(distance, win)
rectangWeight(distance, win)
gaussWeight(distance, win)
epWeight(distance, win)
参数----------Arguments----------
参数:distance
Numeric vector specifying the distance of probes from the central probe. Negative values refer to probes upstream, positive values to probes downstream.
数字矢量指定从中央探针探针的距离。负值是指探针下游探针上游,正面的价值观。
参数:win
Integer specifying maximum size of window.
整数,指定窗口的最大尺寸。
Details
详情----------Details----------
The functions 'triangWeight', 'rectangWeight', 'epWeight' and 'gaussWeight' provide a triangular, rectangular, Epanechnikov and Gaussian weighting window, respectively. The weighting function can be specified by the 'weightingFunction' argument in the 'estimate' method.
功能triangWeight,rectangWeight,epWeight“和”gaussWeight“提供了一个三角形,长方形,Epanechnikov和高斯加权窗口,分别。加权函数可以指定“weightingFunction的说法,”估计“的方法。
This way it is also possible to use custom weighting functions. In general they have to be called the same way as the functions mentioned before and have to return a vector of weights of the same length as the argument 'distance'. For more details on how to use own weighting functions please refer to the vignette of this package.
这种方式,它也可以使用自定义权重函数。一般情况下,他们有相同的方式被称为作为前面提到的功能,并有返回的“距离”参数相同长度的权重向量。对于如何使用自己的权函数的更多细节,请参考这个包的小插曲。
Please note that the returned weights do not have to be normalized since this is done at the computation of the weighted cumulative density.
请注意,返回的重量没有实现标准化,因为这是在计算加权累计密度。
值----------Value----------
A numeric vector with weights for each probe in the window.
数字向量与窗口中的每个探测器的重量。
作者(S)----------Author(s)----------
Julian Gehring
Maintainer: Julian Gehring <julian.gehring@fdm.uni-freiburg.de>
参见----------See Also----------
Package: les-package
包装:les-package
Class: Les
类别:Les
Methods and functions: Les estimate threshold regions ci chi2 export plot
方法和功能:Lesestimatethresholdregionscichi2exportplot
举例----------Examples----------
distance <- seq(-50, 50)
win <- 50
weight <- triangWeight(distance, win)
plot(distance, weight, type="l", main="triangWeight")
weight <- rectangWeight(distance, win)
plot(distance, weight, type="l", main="rectangWeight")
weight <- gaussWeight(distance, win)
plot(distance, weight, type="l", main="gaussWeight")
weight <- epWeight(distance, win)
plot(distance, weight, type="l", main="epWeight")
## simple example for a custom weighting function[#自定义加权功能简单的例子]
ownWeighting <- function(distance, win) {
weight <- as.integer(abs(distance) < win)
return(weight)
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|