gev.d.fit.Rd 4.2 KB
 Jana Ulrich committed Nov 13, 2018 1 % Generated by roxygen2: do not edit by hand  2 % Please edit documentation in R/gevdfit.R  Jana Ulrich committed Nov 13, 2018 3 4 \name{gev.d.fit} \alias{gev.d.fit}  Jana Ulrich committed Nov 24, 2020 5 \title{Maximum-likelihood Fitting of the duration-dependent GEV Distribution}  Jana Ulrich committed Nov 13, 2018 6 \usage{  Laura Mack committed Jul 30, 2020 7 8 9 10 gev.d.fit( xdat, ds, ydat = NULL,  Jana Ulrich committed Nov 24, 2020 11 12 13  mutl = NULL, sigma0l = NULL, xil = NULL,  Laura Mack committed Jul 30, 2020 14 15  thetal = NULL, etal = NULL,  Jana Ulrich committed Nov 24, 2020 16 17 18  mutlink = make.link("identity"), sigma0link = make.link("identity"), xilink = make.link("identity"),  Laura Mack committed Jul 30, 2020 19 20  thetalink = make.link("identity"), etalink = make.link("identity"),  Jana Ulrich committed Oct 06, 2020 21  init.vals = as.list(rep(NA, 5)),  Laura Mack committed Jul 30, 2020 22 23 24 25 26 27  theta_zero = FALSE, show = TRUE, method = "Nelder-Mead", maxit = 10000, ... )  Jana Ulrich committed Nov 13, 2018 28 29 } \arguments{  Jana Ulrich committed Jan 13, 2021 30 \item{xdat}{A vector containing maxima for different durations.  31 This can be obtained from \code{\link{IDF.agg}}.}  Jana Ulrich committed Nov 13, 2018 32   Jana Ulrich committed Jan 13, 2021 33 \item{ds}{A vector of aggregation levels corresponding to the maxima in xdat.  Laura Mack committed Aug 20, 2020 34 1/60 corresponds to 1 minute, 1 corresponds to 1 hour.}  Jana Ulrich committed Nov 13, 2018 35   Jana Ulrich committed Jan 13, 2021 36 37 \item{ydat}{A matrix of covariates for generalized linear modeling of the parameters (or NULL (the default) for stationary fitting). The number of rows should be the same as the  38 length of xdat.}  Jana Ulrich committed Nov 13, 2018 39   Jana Ulrich committed Nov 24, 2020 40 \item{mutl, sigma0l, xil, thetal, etal}{Numeric vectors of integers, giving the columns of ydat that contain  Jana Ulrich committed Jan 13, 2021 41 covariates for generalized linear modeling of the parameters (or NULL (the default)  Jana Ulrich committed Nov 13, 2018 42 if the corresponding parameter is stationary).  Jana Ulrich committed Nov 24, 2020 43 Parameters are: modified location, scale offset, shape, duration offset, duration exponent, respectively.}  Jana Ulrich committed Nov 13, 2018 44   Jana Ulrich committed Jan 13, 2021 45 \item{mutlink, sigma0link, xilink, thetalink, etalink}{Link functions for generalized linear  Jana Ulrich committed Nov 24, 2020 46 modeling of the parameters, created with \code{\link{make.link}}. The default is \code{make.link("identity")}.}  Jana Ulrich committed Nov 13, 2018 47   Jana Ulrich committed Oct 06, 2020 48 \item{init.vals}{list of length 5, giving initial values for all or some parameters  Jana Ulrich committed Jan 13, 2021 49 50 (order: mut, sigma0, xi, theta, eta). If as.list(rep(NA,5)) (the default) is given, initial parameters are obtained internally by fitting the GEV separately for each duration and applying a linear model to obtain the  Jana Ulrich committed Oct 06, 2020 51 52 duration dependency of the location and shape parameter. Initial values for covariate parameters are assumed as 0 if not given.}  Laura Mack committed Jul 30, 2020 53 54 55  \item{theta_zero}{Logical value, indicating if theta should be estimated (FALSE, the default) or should stay zero.}  Jana Ulrich committed Nov 13, 2018 56 57 58 59 60 61 62 63 64 65  \item{show}{Logical; if TRUE (the default), print details of the fit.} \item{method}{The optimization method used in \code{\link{optim}}.} \item{maxit}{The maximum number of iterations.} \item{...}{Other control parameters for the optimization.} } \value{  Jana Ulrich committed Jan 13, 2021 66 67 68 69 70 71 72 A list containing the following components. A subset of these components are printed after the fit. If \code{show} is TRUE, then assuming that successful convergence is indicated, the components nllh, mle and se are always printed. \item{nllh}{single numeric giving the negative log-likelihood value} \item{mle}{numeric vector giving the MLE's for the modified location, scale_0, shape, duration offset and duration exponent, resp.}  Jana Ulrich committed Sep 30, 2019 73 \item{se}{numeric vector giving the standard errors for the MLE's (in the same order)}  Laura Mack committed Jul 30, 2020 74 \item{trans}{A logical indicator for a non-stationary fit.}  Jana Ulrich committed Jan 13, 2021 75 \item{model}{A list with components mutl, sigma0l, xil, thetal and etal.}  Jana Ulrich committed Nov 13, 2018 76 \item{link}{A character vector giving inverse link functions.}  Jana Ulrich committed Jan 13, 2021 77 \item{conv}{The convergence code, taken from the list returned by \code{\link{optim}}.  Jana Ulrich committed Nov 13, 2018 78 A zero indicates successful convergence.}  Jana Ulrich committed Jan 13, 2021 79 80 \item{data}{data is standardized to standard Gumbel.} \item{cov}{The covariance matrix.}  81 \item{vals}{Parameter values for every data point.}  Laura Mack committed Nov 22, 2020 82 \item{init.vals}{Initial values that were used.}  83 \item{ds}{Durations for every data point.}  Jana Ulrich committed Nov 13, 2018 84 85 } \description{  Jana Ulrich committed Jan 13, 2021 86 87 88 Modified \code{\link[ismev]{gev.fit}} function for Maximum-likelihood fitting for the duration-dependent generalized extreme value distribution, following Koutsoyiannis et al. (1998), including generalized linear  Jana Ulrich committed Nov 24, 2020 89 90 91 92 modeling of each parameter. } \details{ For details on the d-GEV and the parameter definitions, see \link{IDF-package}.  Jana Ulrich committed Nov 13, 2018 93 }  Jana Ulrich committed Feb 05, 2019 94 95 96 \examples{ # sampled random data from d-gev with covariates # GEV parameters:  Jana Ulrich committed Nov 24, 2020 97 98 # mut = 4 + 0.2*cov1 +0.5*cov2 # sigma0 = 2+0.5*cov1  Jana Ulrich committed Feb 05, 2019 99 100 101 102 103 104 105 # xi = 0.5 # theta = 0 # eta = 0.5 data('example',package ='IDF') gev.d.fit(xdat=example$dat,ds = example$d,ydat=as.matrix(example[,c('cov1','cov2')])  Jana Ulrich committed Nov 25, 2020 106 ,mutl=c(1,2),sigma0l=1)  Jana Ulrich committed Feb 05, 2019 107 }  Jana Ulrich committed Nov 13, 2018 108 \seealso{  Jana Ulrich committed Nov 24, 2020 109 \code{\link{IDF-package}}, \code{\link{IDF.agg}}, \code{\link{gev.fit}}, \code{\link{optim}}  Jana Ulrich committed Nov 13, 2018 110 }