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

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

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

                                        Produces a 2D map from a fitted max-stable process
                                         从拟合的最大稳定过程中产生的二维图

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

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

Produces a 2D map from a fitted max-stable process.
从拟合的最大稳定过程中产生的二维图。


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


map(fitted, x, y, covariates = NULL, param = "quant", ret.per = 100, 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的输出。


参数:x,y
Numeric vector that gives the coordinates of the grid.
数值向量,给出的坐标的网格。


参数:covariates
An array specifying the covariates at each grid point defined by x and y. If NULL, no covariate is needed. See the example to see how to build it.
一个数组,指定的协变量,在每个格点x和y。如果NULL,没有协变量是必要的。见的例子来看看如何构建它。


参数:param
A character string. Must be one of "loc", "scale", "shape" or "quant" for a map of the location, scale, shape parameters or for a map of a specified quantile.
一个字符串。必须有一个“禄”,“规模化”,“形”或“定量”的位置,规模,形状参数或指定的位数图的图。


参数:ret.per
A numeric giving the return period for which the quantile map is plotted. It is only required if param =       "quant".
一个数字的位数图绘制的回报期。如果只需要param =       "quant"。


参数: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功能的几个参数。


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

A plot. Additionally, a list with the details for plotting the map is returned invisibly.
一个图。此外,绘制的图的详细信息,则返回的列表不可见的。


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


Mathieu Ribatet



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

condmap, filled.contour, heatmap, heat.colors, topo.colors, terrain.colors, rainbow
condmap,filled.contour,heatmap,heat.colors,topo.colors,terrain.colors,rainbow


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


##We run an artifical example using the volcano data set as a study[#我们运行一个人工例如,使用数据作为研究火山]
##region[#区域]
dim <- dim(volcano)
n.x <- dim[1]
n.y <- dim[2]

x <- 10 * 1:n.x
y <- 10 * 1:n.y

n.site <- 15
idx.x <- sample(n.x, n.site)
idx.y <- sample(n.y, n.site)
locations <- cbind(lon = x[idx.x], lat = y[idx.y])
alt <- diag(volcano[idx.x, idx.y])

##Simulate a max-stable process - with unit Frechet margins[#模拟一个最大稳定的过程 - 与单位的Frechet空间]
data <- rmaxstab(40, locations, cov.mod = "whitmat", nugget = 0, range = 750,
smooth = 1)

##Now define the spatial model for the GEV parameters[#GEV参数定义的空间模型]
param.loc <- -10 - 0.04 * locations[,1] + alt / 5
param.scale <- 5 - locations[,2] / 30 + alt / 4
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 + alt
scale.form <- scale ~ lat + alt
shape.form <- shape ~ 1

##  1- Fit a max-stable process[#1  - 适合一个最大稳定的过程]
schlather <- fitmaxstab(data, locations, "whitmat", loc.form, scale.form,
                        shape.form, marg.cov = cbind(alt = alt), nugget =
0, std.err.type = "none")

##  2- Produce a map of the pointwise 50-year return level[#2  - 制作图的逐点的50年一遇水平]

##Here we have only one covariate i.e. alt[#在这里我们只有一个协即ALT]
n.cov <- 1
covariates <- array(volcano, dim = c(n.x, n.y, n.cov), dimnames =
list(NULL, NULL, "alt"))

par(mfrow = c(1,2))
image(x, y, volcano, col = terrain.colors(64), main = "Elevation map")
map(schlather, x, y, covariates, ret.per = 50, plot.contour = FALSE,
main = "50-year return level")

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-10 06:09 , Processed in 0.032457 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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