Skip to contents

Fits two (unbounded) non-extreme marginal distributions to a dataset and returns three plots demonstrating their relative goodness of fit. The distributions are the Gaussian "Gaus", Gumbel "Gum", Laplace "Lapl", Logistic "Logis" and the reverse Gumbel "RGum".

Usage

Diag_Non_Con(Data, Omit = NA, x_lab, y_lim_min = 0, y_lim_max = 1)

Arguments

Data

Numeric vector containing realizations of the variable of interest.

Omit

Character vector specifying any distributions that are not to be tested. Default "NA", all distributions are fit.

x_lab

Character vector of length one specifying the label on the x-axis of histogram and cumulative distribution plot.

y_lim_min

Numeric vector of length one specifying the lower y-axis limit of the histogram. Default is 0.

y_lim_max

Numeric vector of length one specifying the upper y-axis limit of the histogram. Default is 1.

Value

Dataframe $AIC giving the AIC associated with each distribution and the name of the best fitting distribution $Best_fit. Panel consisting of three plots. Upper plot: Plot depicting the AIC of the two fitted distributions. Middle plot: Probability Density Functions (PDFs) of the fitted distributions superimposed on a histogram of the data. Lower plot: Cumulative Distribution Functions (CDFs) of the fitted distributions overlaid on a plot of the empirical CDF.

Examples

S20.Rainfall<-Con_Sampling_2D(Data_Detrend=S20.Detrend.df[,-c(1,4)],
                              Data_Declust=S20.Detrend.Declustered.df[,-c(1,4)],
                              Con_Variable="Rainfall",Thres=0.97)
Diag_Non_Con(Data=S20.Rainfall$Data$OsWL,x_lab="O-sWL (ft NGVD 29)",
             y_lim_min=0,y_lim_max=1.5)
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced
#> Warning: NaNs produced

#> $AIC
#>   Distribution      AIC
#> 1         Gaus 201.1158
#> 2          Gum 396.8524
#> 3         Lapl 209.5831
#> 4        Logis 188.5013
#> 5         RGum 167.1707
#> 
#> $Best_fit
#> [1] "RGum"
#>