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

R语言 rriskBayes包 rrisk.BayesPEM()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-28 21:09:29 | 显示全部楼层 |阅读模式
rrisk.BayesPEM(rriskBayes)
rrisk.BayesPEM()所属R语言包:rriskBayes

                                        Bayesian Prevalence estimation under misclassification (PEM)
                                         根据分类错误的的贝叶斯患病率估计(PEM)

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

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

Bayesian PEM models provide the posterior distribution for the true prevalence (pi), diagnostic sensitivity (se) and specificity (sp) for a given empirical prevalence estimate using physically pooled samples (if k>1) and priors for the model parameters. The misclassification parameters (se and sp) can be specified at the level of the pool or individual level of testing. On the other side, the function estimates the true prevalence based on the results (x/n) of an application study with individual samples (if k=1) using a diagnostic test, for which some prior information on sensitivity and specificity is available.
贝叶斯PEM模型的后验分布的实际患病率(pi),诊断的敏感性(se)和特异性(sp)对于一个给定的经验患病率估计使用物理混合样品(如果 k>1)和先验的模型参数。错分的参数(se和sp)的可指定在池或个体水平测试的水平。在另一边,函数估计,实际患病率的基础上的结果(x/n)的应用研究与个别样品(如果k=1)的诊断测试,其中一些先验信息的敏感性和特异性是可用的。


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


  rrisk.BayesPEM(x, n, k, simulation=FALSE, prior.pi,
    prior.se, prior.sp, misclass="pool",chains=3,
    burn=1000, thin=1, update=10000, workdir=getwd(),
    plots=FALSE)



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

参数:x
scalar value for number of pools (k>1) or individual outcomes (k=1) with positive test result
池数标值(k>1)(k=1)测试结果呈阳性或个人的成果


参数:n
scalar value for number of pools tested (k>1) or the sample size in application study (k=1)
标值测试(k>1)或应用研究的样本数(k=1池的数量)


参数:k
scalar value for number of individual samples physically combined into one pool; set k>1 for pooled sampling and k=1 for individual sampling
个别样品物理上合并成一个存储池的数量,设置的标值k>1汇集采样和k=1个别取样


参数:simulation
logical, value TRUE means the function will be called within any simulation routine, in this case the graphical diagnostic interface will not be invoked (default FALSE)
逻辑,价值TRUE是指该函数将被调用在任何模拟程序中,在这种情况下,将不会被调用图形化的诊断接口(默认FALSE)


参数:prior.pi
numeric vector containing parameters of a beta distribution as prior for prevalence pi, e.g. pi \sim prior.pi(*,*)=beta(*,*)
数字向量的β分布的参数之前流行pi,例如pi\simprior.pi(*,*)=beta(*,*)


参数:prior.se
numeric vector containing parameters of a beta distribution as prior for sensitivity se, e.g. se \sim prior.se(*,*)=beta(*,*)
作为现有的β分布参数灵敏度se,例如数字向量se\simprior.se(*,*)=beta(*,*)


参数:prior.sp
numeric vector containing parameters of a beta distribution as prior for specificity sp, e.g. sp \sim prior.sp(*,*)=beta(*,*)
数字向量的β分布的参数之前的特异性sp,例如: sp\simprior.sp(*,*)=beta(*,*)


参数:misclass
character with legal character entries pool, individual or compare; ignored if k=1
性格与法律特征项pool,individual或compare;忽略,如果K = 1


参数:chains
positive single numeric value, number of independent MCMC chains (default 3)
正面单数值,独立MCMC链(默认为3)


参数:burn
positive single numeric value, length of the burn-in period (default 1000)
积极单一的数值,老化期的长度(默认1000)


参数:thin
positive single numeric value (default 1). The samples from every kth iteration will be used for inference, where k is the value of thin. Setting thin > 1 can help to reduce the autocorrelation in the sample.
积极单一的数值(默认为1)。样品从每一个第k次迭代中,将被用于推断,其中k是薄的值。设置thin > 1可以帮助减少样品中的自相关。


参数:update
positive single numeric value, length of update iterations for estimation (default 10000)
积极单一的数值,更新迭代估计的长度(默认10000)


参数:workdir
character string giving working directory to store temporary data (default getwd())
工作目录来存储临时数据的字符串(默认getwd())


参数:plots
logical, if TRUE the diagnostic plots will be displayed in separate windows
逻辑,如果TRUE诊断图将显示在单独的窗口


Details

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

The Bayesian model for estimation prevalence, sensitivity and specificity has in BRugs/Winbugs syntax following form for misclassification at the pool-level (k>1
贝叶斯模型估计的发病率,敏感性和特异性在BRugs / Winbugs语法错误分类在池级别以下表格(k>1


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

The function rrisk.BayesPEM returns an instance of the bayesmodelClass class containing
函数rrisk.BayesPEM返回bayesmodelClass类的一个实例包含


参数:<code>convergence</code>
logical, whether the model has converged (assessed by the user)
逻辑,该模式是否已经收敛(由用户评估)


参数:<code>results</code>
data frame containing statistics of the posterior distribution  <tr valign="top"><td>jointpost</td>
数据框包含的后验分布的统计<tr valign="top"> <TD> <code>jointpost </代码> </ TD>

data frame giving the joint posterior probability distribution  <tr valign="top"><td>nodes</td>
联合后验概率分布的数据框<tr valign="top"> <TD><code>nodes</ P> </ TD>

names of the parameters jointly estimated by the Bayes model
联合估计的贝叶斯模型的参数名称


参数:<code>model</code>
model in BRugs/Winbugs syntax as a character string  <tr valign="top"><td>chains</td>
模型在BRugs / Winbugs语法作为一个字符串<tr valign="top"> <TD><code>chains</ P> </ TD>

number of independent MCMC chains  <tr valign="top"><td>burn</td>
的独立MCMC链<tr valign="top"> <TD> <code>burn </代码> </ TD>

length of burn-in period  <tr valign="top"><td>update</td>
长度的老化期<tr valign="top"> <TD> <code>update </代码> </ TD>

length of update iterations for estimation
长度的更新迭代估计


注意----------Note----------

The convergence of the model is assessed by the user using diagnostic plots provided by the BRugs package.
模型的收敛性评估由用户使用由BRugs的软件包提供的诊断图。


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

Comparison of methods for estimation of individual-level prevalence based on pooled samples, Prev.Vet.Med. 39: 211-225. <br> <br> Rogan, W.J. and B. Gladen (1978). Estimating prevalence from the results of a screening test. Am. J. Epidemiol. 107: 71-76.

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



#------------------------------------------[------------------------------------------]
# Example of PEM model (k&gt;1)[PEM模型的例子(K> 1)]
#------------------------------------------[------------------------------------------]
pi <- 0.01
se <- 0.96
se.n <- 1000
sp <- 0.99
sp.n <- 1000
n &lt;- sample(10:1000,1,replace=TRUE)  # stochatsic sample size[stochatsic样本量]
k &lt;- sample(5:50,1,replace=FALSE)    # stochastic pool size[随机池的大小]

# Parameters for beta priors[测试先验的参数]
se.a <- se.n*se+1
se.b <- se.n*(1-se)+1
sp.a <- sp.n*sp+1
sp.b <- sp.n*(1-sp)+1

# Random number of positive pools (x) considering uncertainty of se and sp[考虑不确定性的SE和SP的积极池的随机数(X)]
ap <- pi*se + (1-pi)*(1-sp)
p.pos <- 1-(1-ap)^k
x <- rbinom(1,prob=p.pos,size=n)

# Estimate using Bayes model at individual level[在个人层面,估计使用贝叶斯模型]
resPEM1 <- rrisk.BayesPEM(x=x, n=n,k=k,
     prior.pi=c(1,1),prior.se=c(se.a,se.b),prior.sp=c(sp.a,sp.b),
     misclass="individual")
resPEM1@results

# Estimate using Bayes model at pool level[在池级别的,估计使用贝叶斯模型]
resPEM2 <- rrisk.BayesPEM(x=x, n=n,k=k,
     prior.pi=c(1,1),prior.se=c(se.a,se.b),prior.sp=c(sp.a,sp.b),
     misclass="pool")
resPEM2@results

# Estimate using Bayes model compared[估计使用贝叶斯模型比较]
resPEM3 <- rrisk.BayesPEM(x=x, n=n,k=k,
     prior.pi=c(1,1),prior.se=c(se.a,se.b),prior.sp=c(sp.a,sp.b),
     misclass="compare")
resPEM3@results

#------------------------------------------[------------------------------------------]
# Example of PEM model (k=1)[PEM模型(k = 1时)的实施例的]
#------------------------------------------[------------------------------------------]
# informative priors -&gt; convergence is o.k.[先验信息 - >收敛O.K.]
resPEM4<-rrisk.BayesPEM(x=2,n=10,k=1,prior.se=c(12,22),
prior.sp=c(22,55),prior.pi=c(1,1))
resPEM4@results

# non-informative priors -&gt; convergence is not o.k.[非先验信息 - >衔接不确定]
resPEM5<-rrisk.BayesPEM(x=2,n=10,k=1,prior.se=c(1,1),
prior.sp=c(1,1),prior.pi=c(1,1))
resPEM5@results

# informative priors -&gt; convergence is o.k., without invoking[先验信息 - >收敛就可以了,而不必调用]
# graphical diagnostic interface[图形诊断接口]
resPEM6<-rrisk.BayesPEM(x=2,n=10,k=1,prior.se=c(12,22),
prior.sp=c(22,55),prior.pi=c(1,1))
resPEM6@results


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-27 01:28 , Processed in 0.026575 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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