找回密码
 注册
查看: 320|回复: 0

R语言 sparr包 tolerance()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:29:54 | 显示全部楼层 |阅读模式
tolerance(sparr)
tolerance()所属R语言包:sparr

                                         Asymptotic p-value surfaces
                                         渐近p值表面

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Calculates pointwise p-values based on asymptotic theory or Monte-Carlo (MC) permutations describing the extremity of risk over a given fixed or adaptive kernel-smoothed relative risk function.
计算逐点的基础上渐近理论蒙特卡罗(MC)在给定的固定或自适应的内核平滑的相对风险功能描述风险的末端排列的p-值。


用法----------Usage----------


tolerance(rs, pooled, test = "upper",
        method = "ASY", reduce = 1, ITER = 1000,
        exactL2 = TRUE, comment = TRUE)



参数----------Arguments----------

参数:rs
An object of class "rrs" resulting from a call to risk, giving the fixed or adaptive kernel-smoothed risk function.  
类的一个对象"rrs"产生的从一个调用risk,提供固定或自适应的内核平滑的风险功能。


参数:pooled
An object of class "bivden" resulting from a call to bivariate.density (or the component pooled from rs if it was created using raw data arguments) representing a density estimate based on the "pooled" dataset of both "case" and "control" points. If separate from rs, this pooled density estimate must follow the same smoothing approach, evaluation grid and study region window as the densities used to create rs.  
类的一个对象"bivden"调用bivariate.density(或组件pooledrs,如果它是使用原始数据参数)的密度估计的基础上“汇集”数据集“案例”和“控制”点。如果单独从rs,这个汇集密度估计必须遵循相同的平滑方法,评价网格,研究区域窗口的密度用于创建rs。


参数:test
A character string indicating the kind of test desired to yield the p-values. Must be one of "upper" (default - performs upper tailed tests examining heighted risk "hotspots"), "lower" (lower tailed tests examining "troughs") or "double" (double-sided tests). See "Details" for further information.  
一个字符串,表示这种类型的测试需要得到的p值。必须有一个"upper"(默认值 - 执行上尾试验研究heighted风险“热点”),"lower"(下尾检验检查“低谷”)或"double"(双面测试)。的详细信息,请参阅“详细信息”。


参数:method
A character string, either "ASY" (default) or "MC" indicating which method to use for calculating the p-value surface (asymptotic and Monte-Carlo approaches respectively). The MC approach is far more computationally expensive than the asymptotic method (see "Warnings").  
一个字符串,或者是“ASY”(默认)或“MC”,表示使用哪种方法计算p值的表面(渐近的Monte-Carlo方法)。 MC方法更为昂贵的比计算的渐近方法(见“警告”)。


参数:reduce
A numeric value greater than zero and less than or equal to one giving the user the option to reduce the resolution of the evaluation grid for the pointwise p-values by specifying a proportion of the size of the evaluation grid for the original density estimates. For example, if the case and control "bivden" objects were calculated using res = 100 and tolerance was called with reduce = 0.5, the p-value surface will be evaluated over a 50 by 50 grid. A non-integer value resulting from use of reduce will be ceilinged.  
的数值大于零的值,且小于或等于一个给用户的选项,以减少通过指定为原始密度估计的评价网格的大小的比例,评价网格的分辨率为逐点p-值。例如,如果的情况下,控制"bivden"对象的计算采用res = 100和tolerance被称为reduce = 0.5,p值表面将被评估了50 50网格。一个非整数的值产生reduce使用天花板。


参数:ITER
An integer value specifying the number of iterations to be used if method = "MC" (defaulting to 1000). Non-integer numeric values are rounded. Ignored when method = "ASY".  
如果method = "MC"(默认为1000)使用一个整数值,指定的迭代次数。非整数的数值是圆形的。时忽略method = "ASY"。


参数:exactL2
Ignored if rs (and pooled) are fixed-bandwidth density estimates, or if method = "MC". A boolean value indicating whether or not to separately calculate the "L2" integral components for adaptive tolerance contours. A value of FALSE will approximate these components based on the "K2" integrals for faster execution (depending on the size of the evaluation grid, this improvement may be small) at the expense of a small degree of accuracy. Defaults to TRUE. See the reference for adaptive p-value surfaces in "Details" for definitions of these integral components.  
如果忽略rs(和pooled)是固定带宽密度估计,或者如果method = "MC"。一个布尔值,指示是否单独计算自适应公差轮廓的“L2”不可分割的组成部分。 A值FALSE近似K2积分更快的执行(评价网格的大小而定,这种改善可能是小的)的一个小的精确度为代价的基础上这些组件。默认为TRUE的。参阅的参考自适应p值面的“详细资料”的定义,这些不可或缺的组成部分。


参数:comment
Boolean. Whether or not to print function progress (including starting and ending times) during execution. Defaults to TRUE.  
布尔值。无论打印功能在执行过程中的进展(包括开始和结束的时间)。默认为TRUE的。


Details

详细信息----------Details----------

This function implements developments in Hazelton and Davies (2009) (fixed) and Davies and Hazelton (2010) (adaptive) to compute pointwise p-value surfaces based on asymptotic theory of kernel-smoothed relative risk surfaces. Alternatively, the user may elect to calculate the p-value surfaces using Monte-Carlo methods (see Kelsall and Diggle, 1995). Superimposing upon a plot of the risk surface contours of these p-values at given significance levels (i.e. "tolerance contours") can be an informative way of exploring the statistical significance of the extremity of risk across the defined study region. The asymptotic approach to the p-value calculation is advantageous over a Monte-Carlo method, which can lead to excessive computation time for adaptive risk surfaces and large datasets. See the aforementioned references for further comments.
此功能在黑泽尔顿(2009)(固定)和戴维斯,戴维斯和黑泽尔顿(2010)(适应性)计算逐点p值表面的内核平滑的相对风险表面渐近理论的基础上,实现发展。可替代地,用户可以选择使用蒙特卡罗方法(见Kelsall和Diggle,1995)计算p-值表面。叠加在一块的风险表面轮廓的p值在给定的显着性水平(即“宽容轮廓”)可以是信息的方式探索整个研究区域的统计显着性的极端风险。通过Monte-Carlo方法,这可能会导致过多的计算时间为的自适应风险表面和大型数据集的p-值计算的渐近方法是有利的。请参阅上述文献作进一步的评论。

Choosing different options for the argument test simply manipulates the "direction" of the p-values. That is, plotting tolerance contours at a significance level of 0.05 for a p-value surface calculated with test = "double" is equivalent to plotting tolerance contours at significance levels of 0.025 and 0.975 for test = "upper".
选择不同的选项的参数test简单的操作指挥的p值。这是在显着性水平为0.05,绘制轮廓公差,表面的p值计算test = "double"是相当于策划公差轮廓的显着性水平为0.025和0.975 test = "upper"。


值----------Value----------

A list with four components:
列表四部分组成:


参数:X
the equally spaced sequence of length ceiling(reduce*res) giving the evaluation locations on the x axis (where res is the grid resolution as specified in the calls to bivariate.density for calculation of the densities for rs and pooled)
相等间隔的序列的长度ceiling(reduce*res)给予评价位置上的x轴(其中res是调用中指定的网格分辨率bivariate.density用于计算的密度<X >和rs)


参数:Y
as above, for the y axis
如上述,在y轴


参数:Z
a numeric ceiling(reduce*res)*ceiling(reduce*res) matrix giving the values of the risk surface over the evaluation grid. Values corresponding to grid coordinates outside the study region are assigned NA. If method = "MC", this will be a single value of NA
一个数字ceiling(reduce*res)*ceiling(reduce*res)矩阵的风险在评价网格表面给予的值。研究区域以外的网格坐标的对应值分配NA。如果method = "MC",这将是一个单值NA


参数:P
a ceiling(reduce*res)*ceiling(reduce*res) matrix giving the p-values corresponding to the evaluation grid in light of the elected test
一个ceiling(reduce*res)*ceiling(reduce*res)矩阵给予相应的p值的评价电网选举产生的test


警告----------Warning----------

Though far less expensive computationally than calculation of Monte-Carlo p-value surfaces, the asymptotic p-value surfaces (particularly for adaptive relative risk surfaces) can still take some time to complete. The argument of reduce provides an option to reduce this computation time by decreasing the resolution of the evaluation grid. However, the accuracy and appearance of the resulting tolerance contours can be severely degraded if reduce is assigned too small a value. Care must therfore be taken and consideration given to the resolution of the original evaluation grid when altering reduce from its default value. For most practical purposes, we have found a value of reduce resulting in evaluation of a p-value surface of size 50 by 50 is adequate.
虽然便宜得多的计算比计算的Monte-Carlo p值的表面,渐近p值的表面(特别是自适应的相对危险度表面)还需要一些时间才能完成。 reduce的论点提供了一个选项,以减少计算时间,通过降低分辨率的评价网格。然而,reduce如果分配值过小所产生的公差轮廓的精度及外观上可以严重退化。必须注意,因此减速将采取和考虑到时改变原来的评价网格的分辨率reduce从它的默认值。对于最实用的目的,我们已经发现了一种reduce导致评价50大小为50的表面的p-值是足够的值。

The MC approach is provided as an option here for the sake of completeness only, and is coded exclusively in R. The computational cost of this approach for the adaptive risk function is enough to recommend against its use in this case, though it is faster for the fixed-bandwidth case if just comparing MC execution times between the two smoothing regimens. Comments on the issue of MC vs ASY are given in Section 3 of Hazelton and Davies (2009).
MC方法是一个不错的选择,只为了完整性,并只在R编码。这种方法为自适应风险函数的计算成本是足够的建议,在这种情况下,针对其使用,虽然它是更快的固定带宽的情况下,如果只是比较MC的执行时间之间的两个平滑方案。评论在这个问题上的MC与ASY在黑泽尔顿和戴维斯(2009年)第3。


(作者)----------Author(s)----------



T.M. Davies and M.L. Hazelton




参考文献----------References----------

Davies, T.M. and Hazelton, M.L. (2010), Adaptive kernel estimation of spatial relative risk, Statistics in Medicine, 29(23) 2423-2437.<br><br> Hazelton, M.L. and Davies, T.M. (2009), Inference based on kernel estimates of the relative risk function in geographical epidemiology, Biometrical Journal, 51(1), 98-109.

实例----------Examples----------


## Not run: [#不运行:]
data(chorley)
ch.h <- LSCV.density(chorley, hlim = c(0.1, 2))

ch.pool <- bivariate.density(data = chorley, pilotH = ch.h,
adaptive = FALSE)
ch.case <- bivariate.density(data = chorley, ID = "larynx", pilotH = ch.h,
adaptive = FALSE)
ch.con <- bivariate.density(data = chorley, ID = "lung", pilotH = ch.h,
adaptive = FALSE)

##Compute log-risk surface and asymptotic p-value surfaces[计算log风险的表面和渐近p值表面]
ch.rrs <- risk(f = ch.case, g = ch.con)
ch.tol <- tolerance(rs = ch.rrs, pooled = ch.pool)
contour(ch.tol$X, ch.tol$Y, ch.tol$P, levels = 0.05, add = TRUE)



data(PBC)
PBC.casedata <- split(PBC)[[1]]
PBC.controldata <- split(PBC)[[2]]

pbc.rrs.rawdata <- risk(f = PBC.casedata, g = PBC.controldata,
adaptive = TRUE, tolerate = TRUE)

plot(pbc.rrs.rawdata, display = "3d", aspect = 1:2, col = heat.colors(12)[12:1],
tolerance.matrix = pbc.rrs.rawdata$P, tol.opt = list(col = "white", raise = 0.03))


## End(Not run)[#(不执行)]


转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-10 05:14 , Processed in 0.023469 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表