Authors: Florian Kobierska [aut, cre]
Version: 0.1
License: Norgedata (see license.md)
Work for the FlomKart project
RNetCDF, quadprog, goftest, tidyverse, leaflet, fitdistrib, evd, nsRFA, ismev, fitdistrplus, stats, parallel, foreach, doSNOW
doMC, packagedocs
Brier Score. This is implemented according to Equation 1 of the “Cross validation study and verification document”
BS4NC(dat, threshold, param, distr = "distr")
Function to fill upthe NetCDF database
fillup_nc(dat = flood_data, nc_path = "output/flood_database.nc")
The function that calls the right fitting function for each distribution and fitting method
fit_distr(dat, distr = "distr", method = "method")
Anderson Darling
gof_ad(dat, param, distr = "distr", test.stat = TRUE, p.value = FALSE)
Kolmogorov Smirnov. Gives results with warnings but this is because some flood data are repeated (for some strange reason)
gof_ks(dat, param, distr = "distr", test.stat = TRUE, p.value = FALSE)
Function calculating the NT reliability measure TO FINISH
gof_nt(dat, rperiods.nt, param, distr = "distr")
Function that returns only 1 sample with k omited values, according to a specific method (random, sorted min and max)
load_1sample(dat.fulll, k, method = "method")
Figure: MAP OF NORWAY WITH ALL THE STATIONS. WORKS
norway_map(dat, station.nb.vect)
MAP OF NORWA WITH COLOR CHANGING ACCORDING TO THE NUMBER OF DATA.
norway_map2(dat, station.nb.vect)
This function creates a 2 by 2 plot by calling all common plotting functions It plots for any distribution and method, as well as the distribution parameters and Goodness Of Fit values Returns nothing, saves nothing
plot_all(dat, GOF.list, param, distr = "distr", method = "method")
plot fitted probability density function to estimated empirical pdf Returns nothing, saves nothing
plot_density(dat, GOF.list, param, distr = "distr")
Plot estimated and empirical cumulative distribution function
plot_ecdf(dat, param, distr = "distr")
QQ plot of empiricial against modelled
plot_qq(dat, param, distr = "distr")
Plot return levels
plot_rlevel(dat, param, distr = "distr")
Quantile Score. Only uses dat.sample so the calling script should be sending DAT.SAMPLE! This is implemented according to Equation 2 of the “Cross validation study and verification document”
QS4NC(dat, r.levels, r.periods)
RLEVELS4NC(param.estimate, return.periods, distr = "distr")
The function to run all distributions and all methods and output csv files of the GOF
run_all(dat, station.nb.vect, distr = "distr", method = "method")
TEST OF RUN ALL FOR AD ONLY
run_all_ad(dat, station.nb.vect, method = "method")
FF function copied from run_all.r Test of run_all for ff only.
run_all_ff(dat, station.nb.vect, distr = "distr", method = "method")
Test of run_all for ff only. TO COMPARE WITH run_all_ff in F4NCE.R!!!
run_all_ff2(dat, station.nb.vect, distr = "distr", method = "method")
Test of run_all for Ks only.
run_all_ks(dat, station.nb.vect, method = "method")
The function to run all distributions and all methods and output csv files of the GOF
run_all_norm(dat, station.nb.vect, distr = "distr", method = "method")
This function saves a new csv with the utm coordinates of each station in station.nb.vect
save_coordinates(dat, station.nb.vect)