inipopFun: Generates an Initial Population of Transformed Soil Hydraulic...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/inipopFun.R

Description

Draws a Latin Hypercube Sample from a set of uniform distributions in the transformed parameter space,in creating a Latin Hypercube Design. This function uses the Columnwise Pairwise (CP) algorithm to generate an optimal design with respect to the S optimality criterion, as implemented in lhs-package.

Usage

1
inipopFun(p, psel, plo, pup, trans.L, Npop = NA)

Arguments

p

vector of model parameters

psel

vector of selectors

plo

vector of lower boundary values of non-transformed parameters

pup

vector of upper boundary values of non-transformed parameters

trans.L

list of transformation/backtransformation operators with same length as p, psel, plo, and pup.

Npop

integer of initial population size

Details

Produces and optimum latin hypercube sample from a bounded uniform distribution.

Value

n draws of k parameters in an n x k Latin Hypercube Sample matrix with values uniformly distributed on user specified bounds.

Author(s)

Tobias KD Weber , tobias.weber@uni-hohenheim.de

See Also

optimumLHS

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Example based on soil hydraulic property model parameters of shpmodel = "01110" 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)
)
# rules for the parameter transformation
ptransfit<- c(function(x)x, function(x)x,log10,
              function(x)log10(x-1),log10 , function(x)x)
# get latin hypercube sample. 
test.inipop <- inipopFun(parL$p, parL$psel,
                         parL$plo, parL$pup, ptransfit, Npop = 20)
# plot the latin hypercube 
pairs(test.inipop)

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