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

R语言 SpatialEpi包 bayes.cluster()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:38:40 | 显示全部楼层 |阅读模式
bayes.cluster(SpatialEpi)
bayes.cluster()所属R语言包:SpatialEpi

                                        Bayesian Cluster Detection
                                         贝叶斯聚类检测

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

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

Implementation of the Bayesian Cluster detection model of Wakefield and Kim for a study region with n areas. The prior and posterior probabilities of each of the n.zones single zones being a cluster/anti-cluster are estimated using Markov chain Monte Carlo.
实现的贝叶斯聚类检测模型韦克菲尔德和金n领域的研究区域。前和后验概率的n.zones单区聚类/防聚类,利用马尔可夫链蒙特卡罗估计。


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


bayes.cluster(E, cases, population, centroids, map, max.prop, k, shape, rate, J, pi0, n.sim.imp, n.sim.prior, n.sim.post)



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

参数:E
vector of length n of the expected number of disease in each area
向量长度n预期数量的在每个区域中的疾病


参数:cases
vector of length n of the observed number of disease in each area
向量长度n在每个区域所观察到的一些疾病的


参数:population
vector of length n of the population in each area
向量的长度n的人口在每个领域


参数:centroids
an n x 2 table of the (x,y)-coordinates of the area centroids.  The coordinate system must be grid-based  
n x 2表中的(x,y)的坐标的区域的质心。基于网格的坐标系统必须


参数:map
an object of class SpatialPolygons (See SpatialPolygons-class) representing the study region
研究区域的对象类SpatialPolygons(见SpatialPolygons级)


参数:max.prop
maximum proportion of study region's population each single zone can contain
研究区的人口比例最大单区可以包含


参数:k
parameter to tune the prior probability of each single zone being a cluster/anti-cluster as a function of geographical area size
参数来调整每个单个区域的GEO区域的大小作为一个功能是一个聚类/抗聚类的先验概率


参数:shape
narrow/wide shape parameter for gamma prior on relative risk
窄/宽的形状参数的伽玛相对风险


参数:rate
narrow/wide rate parameter for gamma prior on relative risk
窄/宽参数的伽玛相对风险率


参数:J
maximum number of clusters/anti-clusters considered
聚类/反聚类认为的最大数量


参数:pi0
prior probability of no clusters/anti-clusters i.e. probability that J=0
没有联网/反聚类,即概率的先验概率,J = 0


参数:n.sim.imp
number of importance sampling iterations to estimate lambda
重要性采样迭代估计的lambda


参数:n.sim.prior
number of MCMC iterations to estimate prior probabilities associated with each single zone
MCMC迭代估计先验概率与每个单区


参数:n.sim.post
number of MCMC iterations to estimate posterior probabilities associated with each single zone
MCMC迭代估计后验概率与每个单区


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

List containing
List,其中包含


参数:prior.map
A sublist containing, for each area: 1) high.area the prior probability of cluster membership, 2) low.area anti-cluster membership, and 3) RR.est.area smoothed prior estimate of relative risk
子列表中,每个区域:1)high.area的先验概率聚类成员,2)low.area反聚类的成员,和3)RR.est.area平滑事先估计的相对危险度


参数:post.map
A sublist containing, for each area: 1) high.area the posterior probability of cluster membership, 2) low.area anti-cluster membership, and 3) RR.est.area smoothed posterior estimates of the relative risk
子列表中,每个区域:1)high.area的后验概率聚类成员,2)low.area反聚类的成员,和3)RR.est.area平滑后的相对危险性估计


参数:pj.y
posterior probability of j clusters/anti-clusters given y
给定y j的聚类/反聚类的后验概率


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


Albert Y. Kim



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



参见----------See Also----------

kulldorff
kulldorff


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


## Note for the NYleukemia example, 4 census tracts were completely surrounded by another [#注意的NYleukemia的例子中,4个普查小区被完全包围的另一个]
## unique census tract; when applying the Bayesian cluster detection model in [#独特的人口普查时,贝叶斯聚类检测模型]
## \code{\link{bayes.cluster}}, we merge them with the surrounding census tracts yielding [#\代码\的链接{bayes.cluster}},我们将它们合并周围的普查区产生]
## \code{n=277} areas.[#\代码{277}区域。]

## Load data and convert coordinate system from latitude/longitude to grid[#加载数据,并将其转换纬度/经度坐标系统向电网]
data(NYleukemia)
map <- NYleukemia$spatial.polygon
population <- NYleukemia$data$population
cases <- NYleukemia$data$cases
centroids <- latlong2grid(NYleukemia$geo[, 2:3])

## Identify the 4 census tract to be merged into their surrounding census tracts.  [确定被合并到其周围的普查小区的人口普查。]
remove <- NYleukemia$surrounded
add <- NYleukemia$surrounding

## Merge population and case counts and geographical objects accordingly[#合并人口和病例数和相应的GEO对象]
population[add] <- population[add] + population[remove]
population <- population[-remove]
cases[add] <- cases[add] + cases[remove]
cases <- cases[-remove]
map <- SpatialPolygons(map@polygons[-remove], proj4string=CRS("+proj=longlat"))
centroids <- centroids[-remove, ]

## Expected numbers[#预计]
E <- expected(population, cases, 1)

## Set Parameters[#设置参数]
max.prop <- 0.15
k <- 0.00005
shape <- c(2976.3, 2.31); rate <- c(2977.3, 1.31)
J <- 7
pi0 <- 0.95
n.sim.imp <- 0.5*10^3
n.sim.prior <- 0.5*10^4
n.sim.post <- 0.5*10^4

## Compute output[#计算输出]
output <- bayes.cluster(E, cases, population, centroids, map, max.prop, k,
        shape, rate, J, pi0, n.sim.imp, n.sim.prior, n.sim.post)
plotmap(output$prior.map$high.area, map)
plotmap(output$post.map$high.area, map)
plotmap(output$post.map$RR.est.area, map, log=TRUE)
barplot(output$pj.y, names.arg=0:J, xlab="j", ylab="P(j|y)")                  

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-10 01:37 , Processed in 0.027142 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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