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

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

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

                                         Bayesian hierarchical models for spatial extremes
                                         贝叶斯层次模型空间极端

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

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

This function generates a Markov chain from a Bayesian hierarchical model for block maxima assuming conditional independence.
这个函数生成一个马尔可夫链,从贝叶斯层次模型块的最大值假设条件独立的。


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


latent(data, coord, cov.mod = "powexp", loc.form, scale.form,
shape.form, marg.cov = NULL, hyper, prop, start, n = 5000, thin = 1,
burn.in = 0)



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

参数:data
A matrix representing the data. Each column corresponds to one location.
矩阵表示数据。每一列对应于一个位置。


参数:coord
A matrix that gives the coordinates of each location. Each row corresponds to one location.
的矩阵,使每一个位置的坐标。每一行对应于一个位置。


参数:cov.mod
A character string corresponding to the covariance model for the Gaussian latent processes. Must be one of "gauss" for the Smith's model; "whitmat", "cauchy", "powexp" or "bessel" or for the Whittle-Matern, the Cauchy, the Powered Exponential and the Bessel correlation families.  
一个字符串对应的协方差模型为高斯潜在进程。必须“whitmat”,“柯西”的,“powexp”或“贝塞尔”或的惠特尔Matern,柯西,有源指数的和贝塞尔相关的家庭之一“高斯”史密斯的模型; 。


参数:loc.form, scale.form, shape.form
R formulas defining the spatial linear model for the mean of the latent processes.
ŕ式潜进程的平均值限定的空间的线性模型。


参数:marg.cov
Matrix with named columns giving additional covariates for the latent processes means. If NULL, no extra covariates are used.
提供额外的协变量的潜在过程的矩阵命名的列的意思。如果NULL,没有额外的协变量。


参数:hyper
A named list specifying the hyper-parameters — see Details.
命名列表指定的超参数 - 查看详细信息。


参数:prop
A named list specifying the jump sizes when a Metropolis–Hastings move is needed — see Details.
命名的列表,指定的跳跃大小时,都会黑斯廷斯移动 - 查看详细信息。


参数:start
A named list specifying the starting values — see Details.
命名的列表,指定的起始值 - 查看详细信息。


参数:n
The effective length of the simulated Markov chain i.e., once the burnin period has been discarded and after thinning.
的有效长度的模拟的马尔可夫链即,一旦燃尽的期间已被丢弃和减薄后。


参数:thin
An integer specifying the thinning length. The default is 1, i.e., no thinning.
一个整数,指定的细化长度。默认值是1,即没有细化。


参数:burn.in
An integer specifying the burnin period. The default is 0, i.e., no burnin.
一个整数,指定燃尽的时期。默认值是0,即没有燃尽。


Details

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

This function generates a Markov chain from the following model. For each x in R^d, suppose that Y(x) is GEV distributed whose parameters {μ(x), σ(x), ξ(x)} vary smoothly for x in R^d according to a stochastic process S(x). We assume that the processes for each GEV parameters are mutually independent Gaussian processes. For instance, we take for the location parameter μ(x)
这个函数生成一个马尔可夫链,从下面的模型。对于每一个x in R^d,假设Y(x) GEV分布的参数{μ(x), σ(x), ξ(x)}不同顺利地进行的x in R^d根据随机过程S(x)的。我们假设为每个GEV参数的处理是相互独立的高斯过程。举例来说,我们需要的位置参数μ(x)

where f_μ is a deterministic function depending on regression parameters β_μ, and S_μ is a zero mean, stationary Gaussian process with a prescribed covariance function with sill α_μ, range λ_μ and shape parameters κ_μ. Similar formulations for the scale σ(x) and the shape ξ(x) parameters are used. Then conditional on the values of the three Gaussian processes at the sites (x_1, …, x_K), the maxima are assumed to follow GEV distributions
其中f_μ是一个确定的函数根据回归参数β_μ,S_μ是零均值平稳高斯过程与规定的协方差函数与窗台α_μ,范围 X>和形状参数λ_μ。规模相似的制剂κ_μ和形状σ(x)参数使用。然后条件上的值的三个高斯过程在网站ξ(x),最大值假定为遵循GEV分布

independently for each location (x_1, …,     x_K).
独立地为每个位置(x_1, …,     x_K)。

A joint prior density must be defined for the sills, ranges, shapes parameters of the covariance functions as well as for the regression parameters β_μ,β_σ and β_ξ. Conjugate priors are used whenever possible, taking independent inverse Gamma and multivariate normal distributions for the sills and the regression parameters. No conjugate prior exist for λ and κ, for wich a Gamma distribution is assumed.
的联合先验密度的阈值,必须定义范围,形状参数的协方差函数的回归参数以及β_μ,β_σ和β_ξ。尽可能地使用共轭先验,采取独立的的逆Gamma和多元正态分布的阈值和回归参数。无共轭先验存在的λ和κ,至极伽玛分布的假设。

Consequently hyper is a named list with named components
因此hyper是一个命名的命名组件列表




sills A list with three components named 'loc', 'scale' and 'shape' each of these is a 2-length vector specifying the shape and the scale of the inverse Gamma prior distribution for the sill
窗台具有三个分量名为禄,规模“和”形状“的列表每个这些是一个2  - 长度的矢量指定反伽马先验分布的形状和规模的窗台




ranges A list with three components named 'loc', 'scale' and 'shape' each of these is a 2-length vector specifying the shape and the scale of the Gamma prior distribution for the range parameter of
范围A具有三个分量名为禄,规模“和”形状“列表,每个这些是一个2  - 长度的矢量,指定的范围内的参数的形状和规模的Gamma先验分布




smooths A list with three components named 'loc', 'scale' and 'shape' each of these is a 2-length vector specifying the shape and the scale of the Gamma prior distribution for the shape parameter of
有三个分量的名为禄,规模“和”形状“的列表,这些中的每一个是一个2  - 长度的矢量的形状参数指定的Gamma先验分布的形状和规模平滑




betaMean A list with three components named 'loc', 'scale' and 'shape' each of these is a vector specifying the mean vector of the multivariate normal prior distribution for the regression
betaMean名为禄三个组件的列表,“规模”和“形状”每个是一个向量,这些指定的均值向量的多变量正态先验分布回归




betaIcov A list with three components named 'loc', 'scale' and 'shape' each of these is a matrix specifying the inverse of the covariance matrix of the multivariate normal prior distribution
betaIcov列表有三个组成部分命名为禄,scale的“形状”,这些中的每一个是一个矩阵,指定的多元正常先验分布的协方差矩阵的逆

As no conjugate prior exists for the GEV parameters and the range and shape parameters of the covariance functions, Metropolis–Hastings steps are needed. The proposals θ_[prop] are drawn from a proposal density q(. | θ_[cur], s) where θ_[cur] is the current state of the parameter and s is a parameter of the proposal density to be defined. These proposals are driven by prop which is a list with three named components
由于之前没有共轭存在的GEV参数的范围和形状参数的协方差函数,都会黑斯廷斯步骤是必要的。的建议θ_[prop]得出的建议密度q(. | θ_[cur], s)θ_[cur]是当前状态的参数和s的建议密度的参数来定义。这些建议的驱动prop这是一个有三个组件列表




gev A vector of length 3 specifying the standard deviations of the proposal distributions. These are taken to be normal distribution for the location and shape GEV parameters and a
GEV指定长度为3的向量的建议分布的标准偏差。采取的这些措施是正态分布的位置和形状GEV参数和




ranges A vector of length 3 specifying the jump sizes for the range parameters of the covariance functions — q(. | θ_[cur], s) is the log-normal density with mean θ_[cur] and standard deviation
范围的向量长度为3的跳跃大小的范围内的协方差函数的参数指定 - q(. | θ_[cur], s)·是对数正态分布的密度,平均θ_[cur]和标准偏差




smooths A vector of length 3 specifying the jump sizes for the shape parameters of the covariance functions — q(. | θ_[cur], s) is the log-normal density with mean θ_[cur] and standard deviation
平滑的矢量长度为3的协方差函数的形状参数指定的跳跃大小 - q(. | θ_[cur], s)·是对数正态分布的密度,平均θ_[cur]和标准偏差

If one want to held fixed a parameter this can be done by setting a null jump size then the parameter will be held fixed to its starting value.
如果一个人要保持固定的参数可以做到这一点通过设置一个空跳的大小,然后参数将被固定到其初始值。

Finally start must be a named list with 4 named components
最后start必须是命名的有4个命名的组件列表




sills A vector of length 3 specifying the starting values for
窗台的长度为3的一种向量,指定的起始值




ranges A vector of length 3 specifying the starting values
范围指定初始值的向量长度为3




smooths A vector of length 3 specifying the starting values
平滑的矢量长度为3,指定的起始值




beta A named list with 3 components 'loc', 'scale' and 'shape' each of these is a numeric vector specifying the starting
测试命名的3个组成部分“禄”,“规模”和“形状”,这是一个数值向量指定起始


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

A list
一个列表


警告----------Warning----------

This function can be time consuming and makes an intensive use of BLAS routines so it is (much!) faster if you have an optimized BLAS.
这个功能可以耗费时间和BLAS例程集约利用,所以它是(much!)更快,如果你有一个优化的BLAS。

The starting values will never be stored in the generated Markov chain even when burn.in=0.
的初始值将永远不会被存储在所生成的马尔可夫链即使当burn.in=0。


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

If you want to analyze the convergence ans mixing properties of the Markov chain, it is recommended to use the library coda.
如果你要分析的收敛答马尔可夫链的混合属性,建议使用图书馆coda。


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


Mathieu Ribatet



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

Modeling and Analysis for Spatial Data. Chapman & Hall/CRC, New York.
extremes. Extremes 1,449–468.
modelling of extreme precipitation return levels Journal of the American Statistical Association 102:479, 824–840.
Spatial Extremes. Submitted.

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


## Not run: [#不运行:]
## Generate realizations from the model[#从模型生成实现]
n.site <- 30
n.obs <- 50
coord <- cbind(lon = runif(n.site, -10, 10), lat = runif(n.site, -10 , 10))

gp.loc <- rgp(1, coord, "powexp", sill = 4, range = 20, smooth = 1)
gp.scale <- rgp(1, coord, "powexp", sill = 0.4, range = 5, smooth = 1)
gp.shape <- rgp(1, coord, "powexp", sill = 0.01, range = 10, smooth = 1)

locs <- 26 + 0.5 * coord[,"lon"] + gp.loc
scales <- 10 + 0.2 * coord[,"lat"] + gp.scale
shapes <- 0.15 + gp.shape

data <- matrix(NA, n.obs, n.site)
for (i in 1:n.site)
  data[,i] <- rgev(n.obs, locs[i], scales[i], shapes[i])

loc.form <- y ~ lon
scale.form <- y ~ lat
shape.form <- y ~ 1

hyper <- list()
hyper$sills <- list(loc = c(1,8), scale = c(1,1), shape = c(1,0.02))
hyper$ranges <- list(loc = c(2,20), scale = c(1,5), shape = c(1, 10))
hyper$smooths <- list(loc = c(1,1/3), scale = c(1,1/3), shape = c(1, 1/3))
hyper$betaMeans <- list(loc = rep(0, 2), scale = c(9, 0), shape = 0)
hyper$betaIcov <- list(loc = solve(diag(c(400, 100))),
                       scale = solve(diag(c(400, 100))),
                       shape = solve(diag(c(10), 1, 1)))

## We will use an exponential covariance function so the jump sizes for[#我们将使用指数的协方差函数,所以跳的大小为]
## the shape parameter of the covariance function are null.[#协方差函数的形状参数是空的。]
prop <- list(gev = c(1.2, 0.08, 0.08), ranges = c(0.7, 0.8, 0.7), smooths = c(0,0,0))
start <- list(sills = c(4, .36, 0.009), ranges = c(24, 17, 16), smooths
              = c(1, 1, 1),  beta = list(loc = c(26, 0.5), scale = c(10, 0.2),
                               shape = c(0.15)))

mc <- latent(data, coord, loc.form = loc.form, scale.form = scale.form,
             shape.form = shape.form, hyper = hyper, prop = prop, start = start,
             n = 10000, burn.in = 5000, thin = 15)
mc

## End(Not run)[#(不执行)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-10 05:43 , Processed in 0.023993 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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