Learn R Programming

spsh (version 1.1.0)

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

Description

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

Usage

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).

Value

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

Details

Character specifying weightmethod

user user defined weights none
no weights are considered, i.e. no measurement error assumed range rescaling (normalization of observations to the intervall [0,1]
fix1 fixed scalar weight for THETA is 0.05^2 and weight for log10K is 1 fix2
vector 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 est1 Two 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.

Examples

Run this code
# NOT RUN {
# 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) 

# }

Run the code above in your browser using DataLab