A collection of functions that transform the margins of a Latin hypercube sample in multiple ways
qfactor(p, fact)
qinteger(p, a, b)
qdirichlet(X, alpha)
a vector of LHS samples on (0,1)
a factor or categorical variable. Ordered and un-ordered variables are allowed.
a minimum integer
a maximum integer
multiple columns of an LHS sample on (0,1)
Dirichlet distribution parameters. All alpha >= 1
The marginal
mean probability of the Dirichlet distribution is given by alpha[i] / sum(alpha)
the transformed column or columns
qdirichlet
is not an exact quantile function since the quantile of a
multivariate distribution is not unique. qdirichlet
is also not the
independent quantiles of the marginal distributions since
those quantiles do not sum to one. qdirichlet
is the quantile of the
underlying gamma functions, normalized. This is the same procedure that
is used to generate random deviates from the Dirichlet distribution therefore
it will produce transformed Latin hypercube samples with the intended distribution.
q_factor
divides the [0,1] interval into nlevel(fact)
equal sections
and assigns values in those sections to the factor level.