condmap(SpatialExtremes)
condmap()所属R语言包:SpatialExtremes
Produces a conditional 2D map from a fitted max-stable process
从拟合的最大稳定过程生成一个有条件的2D图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Produces a conditional 2D map from a fitted max-stable process.
产生一个有条件的2D图,从拟合的最大稳定过程。
用法----------Usage----------
condmap(fitted, fix.coord, x, y, covariates = NULL, ret.per1 = 100,
ret.per2 = ret.per1, col = terrain.colors(64), plot.contour = TRUE,
...)
参数----------Arguments----------
参数:fitted
An object of class maxstab. Most often, it will be the output of the function fitmaxstab.
对象的类maxstab。大多数情况下,这将是功能fitmaxstab的输出。
参数:fix.coord
The spatial coordinates of the location from which the conditional quantile is computed.
从该条件分位数计算的位置的空间坐标。
参数:x,y
Numeric vector defining the grid at which the levels are computed.
数值向量定义的网格在计算的水平。
参数:covariates
An array specifying the covariates at each grid point defined by x and y. If NULL, no covariate is needed. See map to see how to build it.
一个数组,指定的协变量,在每个格点x和y。如果NULL,没有协变量是必要的。见map来看看如何构建它。
参数:ret.per1,ret.per2
Numerics giving the return period for which the quantile map is plotted. See details.
数值计算位数图绘制的回报期。查看详细信息。
参数:col
A list of colors such as that generated by 'rainbow', 'heat.colors', 'topo.colors', 'terrain.colors' or similar functions.
列表的颜色,如所产生的“彩虹”,“heat.colors”,“topo.colors”,“terrain.colors”或类似的功能。
参数:plot.contour
Logical. If TRUE (default), contour lines are added to the plot.
逻辑。如果TRUE(默认),等高线的图。
参数:...
Several arguments to be passed to the image function.
到传递给image功能的几个参数。
Details
详细信息----------Details----------
The function solves the following equation:
该功能解决了下面的等式:
where z_1 = -1 / log(1 - 1/T_1).
z_1 = -1 / log(1 - 1/T_1)。
In other words, it computes, given that at location x_1 we exceed the level z_1, the levels which is expected to be exceeded in average every T_2 year.
换言之,计算给定的,在位置x_1我们超过水平z_1,预计要超过平均每T_2年的水平。
值----------Value----------
A plot. Additionally, a list with the details for plotting the map is returned invisibly.
一个图。此外,绘制的图的详细信息,则返回的列表不可见的。
(作者)----------Author(s)----------
Mathieu Ribatet
参见----------See Also----------
map, filled.contour, heatmap, heat.colors, topo.colors, terrain.colors, rainbow
map,filled.contour,heatmap,heat.colors,topo.colors,terrain.colors,rainbow
实例----------Examples----------
##Define the coordinate of each location[#定义的每个位置的坐标]
n.site <- 30
locations <- matrix(runif(2*n.site, 0, 10), ncol = 2)
colnames(locations) <- c("lon", "lat")
##Simulate a max-stable process - with unit Frechet margins[#模拟一个最大稳定的过程 - 与单位的Frechet空间]
data <- rmaxstab(50, locations, cov.mod = "whitmat", nugget = 0, range =
2, smooth = 1)
##Now define the spatial model for the GEV parameters[#GEV参数定义的空间模型]
param.loc <- -10 - 4 * locations[,1] + locations[,2]^2
param.scale <- 5 + locations[,2] + locations[,1]^2 / 10
param.shape <- rep(.2, n.site)
##Transform the unit Frechet margins to GEV [#变换单位的Frechet空间GEV]
for (i in 1:n.site)
data[,i] <- frech2gev(data[,i], param.loc[i], param.scale[i],
param.shape[i])
##Define a model for the GEV margins to be fitted[#定义一个模型,的GEV利润的安装]
##shape ~ 1 stands for the GEV shape parameter is constant[#的形状~1的看台为GEV形状参数是常数]
##over the region[#以上的区域]
loc.form <- loc ~ lon + I(lat^2)
scale.form <- scale ~ lat + I(lon^2)
shape.form <- shape ~ 1
## 1- Fit a max-stable process[#1 - 适合一个最大稳定的过程]
fitted <- fitmaxstab(data, locations, "whitmat", loc.form, scale.form,
shape.form, nugget = 0, std.err.type = "none")
cond.coord <- c(5.1, 5.1)
condmap(fitted, cond.coord, seq(0, 10, length = 25), seq(0,10, length
=25), ret.per1 = 100, ret.per2 = 1.5)
points(t(cond.coord), pch = "*", col = 2, cex = 2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|