weightFun: Specification of Weights for the Data Groups Retention Data...

Description Usage Arguments Details Value Examples

View source: R/weightFun.R

Description

Weights can be fixed to suggested standards, fixed by the user, or estimated as additional nuisance parameters.

Usage

1
weightFun(weightmethod = "fix1", retdata, condata, parL = NA)

Arguments

weightmethod

Character specifying the method of selecting model weights, cd Details.

retdata

A dataframe or matrix with 2 columns. The first with pressure head values in [cm] and the second with volumetric water contents in [cm cm-3].

condata

A dataframe or matrix with 2 columns. The first with pressure head values in [cm] and the second with hydraulic conductivity values log10[cm d-1].

parL

Defaults to NA has to be provided if weightmethod == "est1" . See Details of (shypEstFun for explanation of parL).

Details

Character specifying weightmethod

useruser defined weights
noneno weights are considered, i.e. no measurement error assumed
rangerescaling (normalization of observations to the intervall [0,1]
fix1fixed scalar weight for THETA is 0.05^2 and weight for log10K is 1
fix2vector with the length of number of observations as given in retdata and condata are given, fixed to weight for THETA is 0.05^2 and weight for log10K is 1
est1Two scalar model weights (sigma^-2) are treated as free parameters to be estimated by inversion, one for THETA and one for log10K

If weightmethod is set to est1 and parL is given as an extra argument, the function returns a list wich is concatenated to the parL used in shypEstFun providing extra information on the nuisance parameters. Alternatively, parL can be passed as an argument to shypEstFun directly, accounting for the two additional nuisance parameters at the end of the respective vectors.

Value

The function returns a list of weights as specified through weightmethod.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Example 1 | fixed weights
weight.fix.L <- weightFun("fix1") 

# Example 2 | range of measure data
data(shpdata1)

wrc <- shpdata1$TS1$wrc
hcc <- shpdata1$TS1$hcc
# Remove NAs
hcc <- shpdata1$TS1$hcc[!is.na(shpdata1$TS1$hcc[,1] ),]
weight.fix.L <- weightFun("range", wrc, hcc) 

spsh documentation built on April 14, 2020, 6:37 p.m.