Migpd_Fit: Fits Multiple independent generalized Pareto models - Fit

Migpd_FitR Documentation

Fits Multiple independent generalized Pareto models - Fit

Description

Fit multiple independent generalized Pareto models to each column of a data frame. Edited version of the migpd function in texmex, to allow for NAs in a time series.

Usage

Migpd_Fit(
  Data,
  Data_Full = NA,
  mth,
  mqu,
  penalty = "gaussian",
  maxit = 10000,
  trace = 0,
  verbose = FALSE,
  priorParameters = NULL
)

Arguments

Data

A data frame with n columns, each comprising a declustered and if necessary detrended time series to be modelled.

Data_Full

A data frame with n columns, each comprising the original (detrended if necessary) time series to be modelled. Only required if threshold is specified using mqu.

mth

Marginal thresholds, above which generalized Pareto models are fitted. Numeric vector of length n.

mqu

Marginal quantiles, above which generalized Pareto models are fitted. Only one of mth and mqu should be supplied. Numeric vector of length n.

penalty

See ggplot.migpd.

maxit

See ggplot.migpd.

trace

See ggplot.migpd.

verbose

See ggplot.migpd.

priorParameters

See ggplot.migpd.

Value

An object of class "migpd". There are coef, print, plot, ggplot and summary functions available.

See Also

Decluster Detrend Dataframe_Combine

Examples

#With date as first column
S22.GPD<-Migpd_Fit(Data=S22.Detrend.Declustered.df, mqu =c(0.99,0.99,0.99))
#Without date as first column
S22.GPD<-Migpd_Fit(Data=S22.Detrend.Declustered.df[,-1], mqu =c(0.99,0.99,0.99))
#Same GPDs fit as above but thresholds given on the original scale
S22.Rainfall.Quantile<-quantile(na.omit(S22.Detrend.Declustered.df$Rainfall),0.99)
S22.OsWL.Quantile<-quantile(na.omit(S22.Detrend.Declustered.df$OsWL),0.99)
S22.GW.Quantile<-quantile(na.omit(S22.Detrend.Declustered.df$Groundwater),0.99)
S22.GPD<-Migpd_Fit(Data=S22.Detrend.Declustered.df[,-1],
                   mqu =c(S22.Rainfall.Quantile,S22.OsWL.Quantile,S22.GW.Quantile))

rjaneUCF/MultiHazard documentation built on April 20, 2024, 12:48 a.m.