Description Usage Arguments Details Value Note Author(s) Examples
Enables the transformation and backtransformation of parameters. This is widely considered advantageous during parameter estimation as the parameter space in the transformed is well-behaved, e.g. with normally distributed posteriors.
1 | transFun(par.vec, trans.L)
|
par.vec |
Vector of |
trans.L |
list of |
Transformation rules are:
log10 α_i,log10 n_i-1,log10 Ks,log10 ω,log10 Ksc, and log10 Ksnc
.
Returns transformed parameters as specificef by trans.L.
The function is used to transform the parameter space and enabling optimisation or MCMC sampling to be more efficient.
Tobias KD Weber , tobias.weber@uni-hohenheim.de
1 2 3 4 5 6 7 8 9 10 11 12 | # van Genuchten-Mualem Model parameters
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)
)
# Two lists, one with function to transform, the other to back-transform model parameters
ptransfit <- c(function(x)x, function(x)x,log10,function(x)log10(x-1),log10, function(x)x)
pretransfit <- c(function(x)x, function(x)x,function(x)10^x,
function(x)10^x+1,function(x)10^x,function(x)x)
# Transform
p_trans <- transFun(parL$p, ptransfit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.