nim: Fitting the non-stationary index-flood models

Description Usage Arguments Value Details See also Examples

View source: R/nim.R

Description

Fitting the non-stationary index-flood models

Usage

1
nim(formula = ~1, data, method = "Nelder-Mead", tol = 0.1, ...)

Arguments

formula

one or two sided formula describing the model, see Details

data

data.frame including the covariate and the extremes to be fitted

method

method used for the parameter optimization see ?optim

tol

minimum improvement of the log-likelihood between the iteration steps, if the difference between two succesive iteration steps is lower, the iteration ends

...

other parameters passed to optim(control = list(...))

Value

Object of class nim - i.e. simply

Details

The function is a simple wrapper for fitting non-stationary index-flood models with parametric (currently only linear) and smoothing trends in the parameters of the GEV model. Stationary index-flood models can be fitted also. For the data (data.frame) that are used within the function, the attribute extremes (see extremes) has to be set. The trend can be either smooth (s) or parametric (p)n.

See also

sample, fit, ...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data('precip_max')
head(precip_max)
# indicate which columns contain the extremes to be fitted
extremes(precip_max) = 2:ncol(precip_max)

# stationary model
nim( ~1, data = precip_max)

# smooth trend in xi, with bandwidth h = 0.2
nim(xi ~ s(YR, h = 0.2), data = precip_max)

# smooth trend in all parameters, default bandwidth
nim(xi + g + k ~ s(YR), data = precip_max)

# linear trend in xi and gamma
nim(xi + g ~ p(YR), data = precip_max)

hanel/nim documentation built on Sept. 27, 2020, 3:13 a.m.