Learn R Programming

spsh (version 1.1.0)

gofFun: Goodness-of-fit and Information Criteria

Description

Calculates goodness-of-fit criteria and the likelihood-based Akaike and Bayesian Information Criterion based on a given parameter set, typically from the estimation procedure.

Usage

gofFun(
  phat,
  shpmodel = "01110",
  retdata = NULL,
  condata = NULL,
  weight,
  psel,
  ivap.query = NULL,
  hclip.query = FALSE
)

Arguments

phat

Vector of non-transformed (back-transformed) model parameters after estimation, i.e. the best fit or maximum likelihood estimate.

shpmodel

Character specifying the soil hydraulic property model.

retdata

Dataframe or matrix with 2 columns. The first with pressure head values in [cm], i.e. pF values, and the second with volumetric water contents in [cm cm-3].

condata

Dataframe or matrix with 2 columns. The first with pressure head values in [cm], i.e. pF values, and the second with hydraulic conductivity values [cm d-1].

weight

List of the model residual weights used or estimated by the parameter estimation scheme, to calculate the weighted statistical analyses.

psel

Vector specifying the selected parameters for the parameter estimation from parL.

ivap.query

Specification of ivap method, if FALSE selected, no isothermal vapour conductivity is consideredSee Details

hclip.query

Implemented purely for future compatability. Currently no use. See Details

Details

Output for data groups.

th list with goodness of fit statistics for the retention curve see below logKh listwith output same as th but for the fitted conductivity curve
combined list with AIC, AICc, and BIC calculated for the multi-objective function if arguments retdata and condata are both !NULL th list with goodness of fit statistics for the retention curve see below

Statistical analyses of the inverse modelling results.

me mean (weighted) error mae
mean absolute (weighted) error mse mean squared (weighted) error
rss sum of squared (weighted) errors rmse
root mean squared (weighted) error AIC Akaike Information Criteria
AICc corrected Akaike Information Criteria BIC
Bayesian Information Criteria m number of observations

References

Hoege.2018spsh

Examples

Run this code
# NOT RUN {
data("shpdata1")
retdata <- shpdata1$TS1$wrc
condata <- shpdata1$TS1$hcc
condata <- condata[!is.na(condata[,1]),]
# Parameter list
parL <- list("p" = c("thr"= 0.05, "ths" = 0.45, "alf1" = 0.01, "n" = 2, "Ks" = 100, "tau" = .5),
             "psel" = c(1, 1, 0, 1, 1, 1),
             "plo" = c(0.001 , 0.2, 0.001, 1.1, 1, -2),
             "pup" = c(0.3, 0.95, 1, 10, 1e4, 10)
             )
# Calulation of the goodness of fit.
gofL <-gofFun(parL$p, shpmodel = "01110", retdata = retdata, condata = condata, 
              weight = weightFun(weightmethod = "fix1"), parL$psel, 
              ivap.query = NULL, hclip.query = FALSE)
# }

Run the code above in your browser using DataLab