spatialkernel-package(spatialkernel)
spatialkernel-package()所属R语言包:spatialkernel
The Spatialkernel Package
Spatialkernel包装
译者:生物统计家园网 机器人LoveR
描述----------Description----------
An R package for spatial point process analysis.
空间点过程分析的R包。
Details
详细信息----------Details----------
This package contains functions for spatial point process analysis using kernel smoothing methods. This package has been written to be compatible with the splancs package which is available on <CITE>CRAN</CITE> (The Comprehensive R Archive Network).
此套件包含的功能空间点过程的分析,利用核平滑的方法。这个包已经被写入到兼容的splancs包,这是<CITE> CRAN </ CITE>(综合ŕ档案网络)。
For a complete list of functions with individual help pages, use library(help = \ "spatialkernel").
对于一个完整的函数列表,个人的帮助页面,使用library(help = \ "spatialkernel")。
保持----------Maintainer----------
Pingping Zheng pingping.zheng@lancaster.ac.uk
平平郑pingping.zheng的@ lancaster.ac.uk
注意----------Note----------
For the convience of the user, we present here examples which show how to use some of the functions in the package.
对于的海陆空的用户,我们在座的例子,说明如何使用包中的某些功能。
(作者)----------Author(s)----------
Pingping Zheng and Peter Diggle
参考文献----------References----------
Kernel Smoothing — When Is It Necessary? Proceedings of the GisVet Conference 2004, University of Guelph, Ontario, Canada, June 2004.
Nonparametric estimation of spatial segregation in a multivariate point process: bovine tuberculosis in Cornwall, UK. J. R. Stat. Soc. C, 54, 3, 645–658.
参见----------See Also----------
cvloglk, phat, mcseg.test, plotphat, plotmc, pinpoly,
cvloglk,phat,mcseg.test,plotphat,plotmc,pinpoly,
实例----------Examples----------
## An example of spatial segregation analysis[#空间分离分析的一个例子]
## Not run: [#不运行:]
## source in Lansing Woods tree data within a polygon boundary[蓝星的伍兹树数据源,一个多边形的边界内]
data(lansing)
data(polyb)
## select data points within polygon[#选择中的数据点多边形。]
ndx <- which(pinpoly(polyb, as.matrix(lansing[c("x", "y")])) > 0)
pts <- as.matrix(lansing[c("x", "y")])[ndx,]
marks <- lansing[["marks"]][ndx]
## select bandwidth[#选择带宽]
h <- seq(0.02, 0.1, length=101)
cv <- cvloglk(pts, marks, h=h)$cv
hcv <- h[which.max(cv)]
plot(h, cv, type="l")
## estimate type-specific probabilities and do segregation tests[#特定类型的概率估计,并做隔离测试]
## by one integrated function[#由一体的综合性功能]
sp <- spseg(pts, marks, hcv, opt=3, ntest=1000, poly=polyb)
## plot estimated type-specific probability surfaces[#图估计特定类型的概率面]
plotphat(sp)
## additional with pointwise significance contour lines[#额外的逐点的意义等高线]
plotmc(sp, quan=c(0.025, 0.975))
## p-value of the Monte Carlo segregation test[#p值的Monte Carlo隔离测试]
cat("\np-value of the Monte Carlo segregation test", sp$pvalue)
##estimate intensity function at grid point for presentation[估计强度功能在网格点介绍]
##with bandwidth hcv[#带宽丙型肝炎病毒]
gridxy <- as.matrix(expand.grid(x=seq(0, 1, length=101), y=seq(0, 1, length=101)))
ndx <- which(pinpoly(polyb, gridxy) > 0) ##inside point index[#里面点指数]
lam <- matrix(NA, ncol=101, nrow=101)
lam[ndx] <- lambdahat(pts, hcv, gpts = gridxy[ndx,], poly =
polyb)$lambda
brks <- pretty(range(lam, na.rm=TRUE), n=12)
plot(0, 0, xlim=0:1, ylim=0:1, xlab="x", ylab="y", type="n")
image(x=seq(0, 1, length=101), y=seq(0, 1, length=101),
z=lam, add=TRUE, breaks=brks, col=risk.colors(length(brks)-1))
polygon(polyb)
metre(0, 0.01, 0.05, 0.51, lab=brks, col=risk.colors(length(brks)-1), cex=1)
## An example of inhomogeneous intensity function and K function[#不均匀的强度函数和K函数的一个例子]
## estimated with the same data[#估计具有相同的数据]
s <- seq(0, 0.06, length=101)
lam <- lambdahat(pts, hcv, poly=polyb)$lambda
kin <- kinhat(pts, lam, polyb, s)
plot(kin$s, kin$k-pi*(kin$s)^2, xlab="s", ylab="k-pi*s^2", type="l")
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|