LSCV.density(sparr)
LSCV.density()所属R语言包:sparr
Leave-one-out least-squares cross-validation (LSCV) for bivariate KDE bandwidths
留出最小二乘跨为的二元KDE带宽的的验证(LSCV)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Provides an isotropic LSCV bandwidth estimate for use in 2-dimensional kernel density estimation (see e.g. Bowman and Azzalini, 1997).
提供的的各向同性LSCV带宽估计在2维的内核密度估计(见如鲍曼和Azzalini的,1997年)。
用法----------Usage----------
LSCV.density(data, hlim = NULL, res = 128, edge = TRUE,
WIN = NULL, quick = TRUE, comment = TRUE)
参数----------Arguments----------
参数:data
An object of type data.frame, list, matrix, or ppp describing the observed data from which we wish to calculate the LSCV bandwidth. See "Details" for further information.
类型的对象,data.frame,list,matrix或ppp描述所观察到的数据,我们希望计算的LSCV的带宽。的详细信息,请参阅“详细信息”。
参数:hlim
A numeric vector of length 2 giving the interval over which to search for the bandwidth that minimises the selection criterion. If NULL (default), the function attempts to automatically select an appropriate range based on multiples of Stoyan and Stoyan's (1994) rule-of-thumb. The user is strongly recommended to supply their own hlim.
给一个数值向量长度为2的时间间隔要搜索的带宽,最大限度地减少了选择标准。如果NULL(默认),该函数尝试的基础上斯托扬和斯托扬(1994)的经验规则的倍数来自动选择一个合适的范围内。强烈建议用户提供他们自己的hlim。
参数:res
Single integer giving the square grid resolution over which evaluation of the selection criterion takes place. Defaults to a 128 by 128 grid.
单整数的正方形网格分辨率的选择标准评估的发生。默认为128,128格。
参数:edge
Boolean. Whether or not to employ edge-correction in the calculations. Defaults to TRUE.
布尔值。是否要在计算中采用边缘校正。默认为TRUE的。
参数:WIN
A polygonal owin object giving the study region. Ignored if data is already a ppp.object.
一个多边形的owin对象,使研究区域。 data如果已经是一个ppp.object忽略。
参数:quick
Intended for advanced use; users are recommended not to change the default TRUE. Setting quick = FALSE forces the function to individually evaluate the CV objective function at each of seq(hlim[1], hlim[2], length = 50) bandwidths, returning the corresponding values. Can be useful for diagnostic purposes.
供高级用户使用的用户,建议不要更改默认的TRUE。设置quick = FALSE强制的功能单独评估CV目标函数在每个seq(hlim[1], hlim[2], length = 50)带宽,返回相应的值。可能是有用的用于诊断目的。
参数:comment
Boolean. Whether or not to print function progress during execution. Defaults to TRUE.
布尔值。无论打印功能在执行过程中的进展。默认为TRUE的。
Details
详细信息----------Details----------
This function calculates a LSCV smoothing bandwidth for kernel density estimates of 2-dimensional (bivariate) data. If the data argument is a data.frame or a matrix, this must have exactly two columns containing the x ([,1]) and y ([,2]) data values. Should data be a list, this must have two vector components of equal length named x and y. Alternatively, data may be an object of class ppp (see ppp.object).
此函数计算LSCV的平滑带宽的内核密度估计的2维(二元)的数据。如果data参数是一个data.frame或matrix,这必须有两列包含x([,1])和y([,2])的数据值。 data是list,这必须有两个长度相等的名为x和y矢量分量。另外,data可能是类的一个对象ppp(见ppp.object)。
值----------Value----------
A single numeric value of the estimated bandwidth (if quick = FALSE, this value is named hopt; additionally returned are the objective function values (lscv) and the index of the minimum value (ind)). The user may need to experiment with adjusting hlim to find a suitable minimum.
一个数值的估计带宽(如果quick = FALSE,这个值命名为hopt;另外返回的目标函数值(lscv),该指数的最低值(ind))。用户可根据需要进行实验的调整hlim找到一个合适的最低。
警告----------Warning----------
Leave-one-out LSCV for bandwidth selection in kernel density estimation is notoriously unstable in practice and has a tendency to produce rather small bandwidths. Satisfactory bandwidths are not guaranteed for every application. This method can also be computationally expensive for large data sets and fine evaluation grid resolutions.
在内核密度估计的带宽选择留出LSCV是出了名的不稳定,在实践中有一种倾向产生比较小的带宽。令人满意的带宽不能保证每一个应用程序。这种方法也可以计算昂贵的大型数据集和精细评价电网决议。
(作者)----------Author(s)----------
T.M. Davies
参考文献----------References----------
Stoyan, D. and Stoyan, H. (1994), Fractals, Random Shapes and Point Fields. Wiley, Great Britain. ISBN 0-471-93757-6.<br><br>
参见----------See Also----------
spatstat's function bw.relrisk
spatstat的功能bw.relrisk
实例----------Examples----------
## Not run: [#不运行:]
data(PBC)
##PBC cases[#PBC的情况下]
LSCV.density(split(PBC)[[1]],hlim=c(10,400))
##PBC controls[#PBC控制]
LSCV.density(split(PBC)[[2]],hlim=c(10,400))
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|