fitcopula(SpatialExtremes)
fitcopula()所属R语言包:SpatialExtremes
Fit a copula-based model to spatial extremes
Copula的模型适合对空间的极致
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function fits various copula-based models to spatial extremes data sets.
此功能适合不同的Copula函数为基础的模型空间极端的数据集。
用法----------Usage----------
fitcopula(data, coord, copula = "gaussian", cov.mod = "whitmat",
loc.form, scale.form, shape.form, marg.cov = NULL, temp.cov = NULL,
temp.form.loc = NULL, temp.form.scale = NULL, temp.form.shape = NULL,
..., start, control = list(maxit = 10000), method = "Nelder", std.err =
TRUE, warn = TRUE, corr = FALSE)
参数----------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.
的矩阵,使每一个位置的坐标。每一行对应于一个位置。
参数:copula
A character string. Must be one of "gaussian" and "student" for a Gaussian and Student copula.
一个字符串。必须有一个“高斯”和“学生”的高斯和学生系词。
参数:cov.mod
A character string corresponding to the correlation function family used in the copula. Must be one of "whitmat", "cauchy", "powexp", "bessel" or "caugen" for the Whittle-Matern, the Cauchy, the Powered Exponential, the Bessel and the Generalized Cauchy correlation families.
相应的Copula函数中使用的相关函数族的一个字符串。必须一个“whitmat”,“柯西”中,“powexp”,“贝塞尔”或“caugen”的惠特尔的Matern,柯西,动力指数,贝塞尔和广义柯西相关的家庭。
参数:loc.form, scale.form, shape.form
R formulas defining the spatial linear model for the GEV parameters. May be missing. See section Details of function fitmaxstab.
ŕ公式定义空间的线性模型的GEV参数。可能会丢失。请参见功能fitmaxstab。
参数:marg.cov
Matrix with named columns giving additional covariates for the GEV parameters. If NULL, no extra covariates are used.
额外的协变量的GEV参数的指定列的矩阵。如果NULL,没有额外的协变量。
参数:temp.cov
Matrix with names columns giving additional *temporal* covariates for the GEV parameters. If NULL, no temporal trend are assume for the GEV parameters — see section Details of function fitmaxstab.
矩阵的列名提供额外的时间*协变量的GEV参数的。如果NULL,没有时间趋势的假设的GEV参数 - 看到部分功能fitmaxstab详情。
参数:temp.form.loc, temp.form.scale, temp.form.shape
R formulas defining the temporal trends for the GEV parameters. May be missing. See section Details of function fitmaxstab.
ŕ公式定义的GEV参数的变化趋势。可能会丢失。请参见功能fitmaxstab。
参数:...
Several arguments to be passed to the optim, nlm or nlminb functions.
几个参数被传递到optim,nlm或nlminb函数。
参数:start
A named list giving the initial values for the parameters over which the pairwise likelihood is to be minimized. If start is omitted the routine attempts to find good starting values - but might fail.
命名的列表,给出的参数成对的可能性是最小化的初始值。如果start省略的日常试图找到很好的起点值 - 但可能会失败。
参数:control
A list giving the control parameters to be passed to the optim function.
一个列表,给出的控制参数被传递到optim功能。
参数:method
The method used for the numerical optimisation procedure. Must be one of BFGS, Nelder-Mead, CG, L-BFGS-B, SANN, nlm or nlminb. See optim for details. Please note that passing nlm or nlminb will use the nlm or nlminb functions instead of optim.
所使用的方法的数值优化程序。必须有一个BFGS,Nelder-Mead,CG,L-BFGS-B,SANN,nlm或nlminb。见optim的详细信息。请注意,通过nlm或nlminb使用nlm或nlminb函数,而不是optim。
参数:std.err
Logical. Should the standard errors be computed ? The default is to return the standard errors, i.e., std.err = TRUE.
逻辑。的标准误差计算?默认情况下返回的标准错误,即,std.err = TRUE。
参数:warn
Logical. If TRUE (default), users are warned if the log-likelihood is infinite at starting values and/or problems arised while computing the standard errors.
逻辑。 TRUE如果(默认),用户都警告说,如果对数似然是无限的初始值和/或自行拆解的问题,同时计算标准的错误。
参数:corr
Logical. If TRUE (non default), the asymptotic correlation matrix is computed.
逻辑。如果TRUE(非默认)的渐近相关矩阵的计算。
值----------Value----------
This function returns a object of class copula.
这个函数返回一个对象类copula。
警告----------Warning----------
This function does not use max-stable copula and the use of non max-stable copula for modelling spatial extreme is highly questionable. This function was mainly implemented for educational purposes and not for concrete modelling purposes.
不使用此功能最大的稳定copula和使用非最大稳定Copula函数来模拟空间极端是非常值得怀疑的。此功能主要是实现教育目的,而不是具体的建模的目的。
(作者)----------Author(s)----------
Mathieu Ribatet
参考文献----------References----------
of Spatial Extremes. Submitted to Statistical Science.
参见----------See Also----------
fitmaxstab, latent
fitmaxstab,latent
实例----------Examples----------
## Not run: [#不运行:]
n.site <- 30
n.obs <- 50
coord <- matrix(runif(2 * n.site, -10, 10), ncol = 2)
colnames(coord) <- c("lon", "lat")
## Generate data from a Gaussian copula model[#生成一个的高斯Copula函数模型的数据。]
data <- rcopula(n.obs, coord, "gaussian", "powexp", nugget = 0, range = 4, smooth = 1.2)
## Transform the margins to GEV[#变换的边缘GEV]
locs <- -5 + coord[,"lon"] / 10
scales <- 10 + coord[,"lat"] / 2
shapes <- rep(0.2, n.site)
for (i in 1:n.site)
data[,i] <- frech2gev(data[,i], locs[i], scales[i], shapes[i])
## Fit a Gaussian copula model[#符合高斯copula模型]
## 1. Define trend surfaces[#1。定义趋势面]
loc.form <- y ~ lon
scale.form <- y ~ lat
shape.form <- y ~ 1
## 2. Fit[#2。适合]
M0 <- fitcopula(data, coord, "gaussian", "powexp", loc.form, scale.form,
shape.form, nugget = 0)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|