extGP.fit: Fitting the extended GP model

View source: R/fit_extGP.R

extGP.fitR Documentation

Fitting the extended GP model

Description

Fitting the extended GP model

Usage

extGP.fit(
  y,
  init,
  ym = 0,
  step = 0,
  bootstrap = TRUE,
  R = 500,
  plots = TRUE,
  filename = NULL,
  ncpus = parallel::detectCores(),
  ym.param = FALSE
)

Arguments

y

vector of positive data

init

initialisation parameters, a vector of length 3

ym

minimal value that can be observed

step

discretization step

bootstrap

boolean, should boostrap replicates be fitted?

R

number of bootstrap replicates

plots

boolean, should plots be drawn?

filename

if you want to save the plots, a character for your file's name

ncpus

number of cores

ym.param

boolean, should ym be a parameter?

Details

The extended GP model \insertCitenaveau2016modelingtcG is define for positive rainfall as

Y+ = ym + \sigma H_\xi^{-1}(U^{1/\alpha}),

with H_\xi the cdf of a GPD.

Value

A list of four elements containing the results of the fitted model. par gives the fitted parameters. AIC gives the Akaike criterion. fit.boot gives the parameters fitted with the bootstrap replicates. Finally for.plots is a list that is used by the function res.plot.

References

\insertAllCited

Examples

## Not run: 
res2=extGP.fit(rain[rain>0], c(2,.5,.5), ym=.3, step=.1, R=50)

## End(Not run)

mbtgy/tcG documentation built on Oct. 19, 2023, 3:10 p.m.