gev.d.fit | R Documentation |
Modified gev.fit
function for Maximum-likelihood fitting
for the duration-dependent generalized extreme
value distribution, following Koutsoyiannis et al. (1998), including generalized linear
modeling of each parameter.
gev.d.fit( xdat, ds, ydat = NULL, mutl = NULL, sigma0l = NULL, xil = NULL, thetal = NULL, etal = NULL, taul = NULL, eta2l = NULL, mutlink = make.link("identity"), sigma0link = make.link("identity"), xilink = make.link("identity"), thetalink = make.link("identity"), etalink = make.link("identity"), taulink = make.link("identity"), eta2link = make.link("identity"), init.vals = NULL, theta_zero = FALSE, tau_zero = TRUE, eta2_zero = TRUE, show = TRUE, method = "Nelder-Mead", maxit = 10000, ... )
xdat |
A vector containing maxima for different durations.
This can be obtained from |
ds |
A vector of aggregation levels corresponding to the maxima in xdat. 1/60 corresponds to 1 minute, 1 corresponds to 1 hour. |
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 length of xdat. |
mutl, sigma0l, xil, thetal, etal, taul, eta2l |
Numeric vectors of integers, giving the columns of ydat that contain covariates for generalized linear modeling of the parameters (or NULL (the default) if the corresponding parameter is stationary). Parameters are: modified location, scale offset, shape, duration offset, duration exponent, respectively. |
mutlink, sigma0link, xilink, thetalink, etalink, eta2link, taulink |
Link functions for generalized linear
modeling of the parameters, created with |
init.vals |
list, giving initial values for all or some parameters (order: mut, sigma0, xi, theta, eta, eta2, tau). If one of those parameters shall not be used (see theta_zero, eta2_zero, tau_zero), the number of parameters has to be reduced accordingly. If some or all given values in init.vals are NA or no init.vals at all is declared (the default), initial parameters are obtained internally by fitting the GEV separately for each duration and applying a linear model to obtain the duration dependency of the location and shape parameter. Initial values for covariate parameters are assumed as 0 if not given. |
theta_zero |
Logical value, indicating whether theta should be estimated (FALSE, the default) or should stay zero. |
tau_zero, eta2_zero |
Logical values, indicating whether tau,eta2 should be estimated (TRUE, the default). |
show |
Logical; if TRUE (the default), print details of the fit. |
method |
The optimization method used in |
maxit |
The maximum number of iterations. |
... |
Other control parameters for the optimization. |
For details on the d-GEV and the parameter definitions, see IDF-package.
A list containing the following components.
A subset of these components are printed after the fit.
If show
is TRUE, then assuming that successful convergence is indicated,
the components nllh, mle and se are always printed.
nllh |
single numeric giving the negative log-likelihood value |
mle |
numeric vector giving the MLE's for the modified location, scale_0, shape, duration offset and duration exponent, resp. If requested, contains also second duration exponent and intensity-offset |
se |
numeric vector giving the standard errors for the MLE's (in the same order) |
trans |
A logical indicator for a non-stationary fit. |
model |
A list with components mutl, sigma0l, xil, thetal and etal. If requested, contains also eta2l and taul |
link |
A character vector giving link functions. |
conv |
The convergence code, taken from the list returned by |
data |
data is standardized to standard Gumbel. |
cov |
The covariance matrix. |
vals |
Parameter values for every data point. |
init.vals |
Initial values that were used. |
ds |
Durations for every data point. |
IDF-package
, IDF.agg
, gev.fit
, optim
# sampled random data from d-gev with covariates # GEV parameters: # mut = 4 + 0.2*cov1 +0.5*cov2 # sigma0 = 2+0.5*cov1 # xi = 0.5 # theta = 0 # eta = 0.5 # eta2 = 0 # tau = 0 data('example',package ='IDF') gev.d.fit(xdat=example$dat,ds = example$d,ydat=as.matrix(example[,c('cov1','cov2')]) ,mutl=c(1,2),sigma0l=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.