gev.d.fit.Rd 3.83 KB
Newer Older
1
% Generated by roxygen2: do not edit by hand
2
% Please edit documentation in R/gevdfit.R
3
4
5
6
\name{gev.d.fit}
\alias{gev.d.fit}
\title{Maximum-likelihood Fitting of the duration dependent GEV Distribution}
\usage{
7
gev.d.fit(xdat, ds, ydat = NULL, mul = NULL, sigl = NULL,
8
9
10
  shl = NULL, thetal = NULL, etal = NULL, mulink = identity,
  siglink = identity, shlink = identity, thetalink = identity,
  etalink = identity, muinit = NULL, siginit = NULL, shinit = NULL,
11
  thetainit = NULL, etainit = NULL, show = TRUE,
12
  method = "Nelder-Mead", maxit = 10000, init.vals = NULL, ...)
13
14
}
\arguments{
15
16
\item{xdat}{A vector containing maxima for different durations. 
This can be obtained from \code{\link{IDF.agg}}.}
17
18
19

\item{ds}{A vector of aggregation levels corresponding to the maxima in xdat.}

20
21
22
\item{ydat}{A matrix of covariates for generalized linear modelling of the parameters 
(or NULL (the default) for stationary fitting). The number of rows should be the same as the 
length of xdat.}
23
24

\item{mul, sigl, shl, thetal, etal}{Numeric vectors of integers, giving the columns of ydat that contain
25
covariates for generalized linear modelling of the parameters (or NULL (the default) 
26
27
28
29
30
31
if the corresponding parameter is stationary).
Parameters are: modified location, scale_0, shape, duration offset, duration exponent repectively.}

\item{mulink, siglink, shlink, thetalink, etalink}{Inverse link functions for generalized linear 
modelling of the parameters.}

32
33
34
35
36
\item{muinit, siginit, shinit, thetainit, etainit}{initial values as numeric of length 
equal to total number of parameters 
used to model the parameters. If NULL (the default) is given, initial parameters are obtained 
internally by fitting the GEV seperately for each duration and applying a linear model to optain the 
duration dependency of the location and shape parameter.}
37
38
39
40
41
42
43

\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.}

44
45
\item{init.vals}{vector of length 5, giving initial values for parameter intercepts}

46
47
48
49
50
\item{...}{Other control parameters for the optimization.}
}
\value{
A list containing the following components. 
A subset of these components are printed after the fit. 
51
52
If show is TRUE, then assuming that successful convergence is indicated, 
the components nllh, mle and se are always printed. 
53
54
55
56
57
58
59
60
61
62
\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.} 
\item{se}{numeric vector giving the standard errors for the MLE's (in the same order).}
\item{trans}{An logical indicator for a non-stationary fit.}
\item{model}{A list with components mul, sigl, shl, thetal and etal.}
\item{link}{A character vector giving inverse link functions.}
\item{conv}{The convergence code, taken from the list returned by \code{\link{optim}}. 
A zero indicates successful convergence.}
\item{data}{data is standardized to standart Gumbel.} 
63
64
65
66
\item{cov}{The covariance matrix.} 
\item{vals}{Parameter values for every data point.}
\item{init.vals}{Initial values that where used.}
\item{ds}{Durations for every data point.}
67
68
}
\description{
69
70
Modified \code{\link[ismev]{gev.fit}} function for Maximum-likelihood fitting 
for the duration dependent generalized extreme 
71
value distribution, following Koutsoyiannis et al. (1988), including generalized linear 
72
modelling of each parameter.
73
}
74
75
76
77
78
79
80
81
82
83
84
85
86
87
\examples{
# sampled random data from d-gev with covariates
# GEV parameters:
# mu = 4 + 0.2*cov1 +0.5*cov2
# sigma = 2+0.5*cov1
# 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')])
,mul=c(1,2),sigl=1)
}
88
\seealso{
89
\code{\link{dgev.d}}, \code{\link{IDF.agg}}, \code{\link{gev.fit}}, \code{\link{optim}}
90
}