Description Usage Arguments Details Value Author(s) Examples
Aggregate the data for quasi-likelihood estimation
1 2 |
runs |
list or matrix of simulation results from |
X |
list or matrix of model parameters |
var.type |
character, " |
Nb |
numeric, number of bootstrap samples for kriging the variance matrix,
only if ' |
na.rm |
if |
verbose |
if |
The function aggregates all neccessary data for quasi-likelihood estimation storing the
sample locations and the corresponding simulation results of the statistics.
If 'X' equals NULL, then the sample points are taken from the object 'runs'.
The most critical part is the decomposition of variance matrices for each sample location unless 'var.type'
equals "const" in which case a constant variance matrix approximation is expected later by function qle.
The Cholesky decompositions are used for average approximations of the variance matrix of the statistics when calculating the
quasi-score vector or any type of function criterion based on the Mahalanobis distance or quasi-deviance.
If these fail for any reason we try to ignore, if possible, the corresponding sample points and exclude them
from all following calculations. Unless a constant estimate of the variance matrix, the default is to approximate the
variance at any model parameter by either a kriging interpolation of the Cholesky terms or as an average over
all sampled variance matrices also based on the decomposed Cholesky terms (see vignette).
An object of class QLdata as a data frame with columns:
X |
Model parameters ( |
mean |
Results of simulations ( |
var |
Simulation variances of statistics ( |
L |
if applicable, Cholesky decomposed terms of variance matrices of statistics (k=1,...,(m*(m+1)/2)) |
where 'p' denotes the number of user defined statistics and 'q' the problem dimension, that is,
the number of parameters to be estimated.
The following items are stored as attributes:
type |
see above |
nsim |
number of simulations at each point |
xdim |
parameter dimension |
nWarnings |
Number of warnings during simulations |
nErrors |
Number of errors during simulations |
nIgnored |
List of parameters ignored (because of failures) |
M. Baaske
1 2 3 4 5 6 7 8 9 10 11 12 13 | # simulate model statistics at LHS design
sim <- simQLdata(sim =
function(x,cond) {
X <- rlnorm(cond$n,x[1],x[2])
c("MED"=median(X),"MAD"=mad(X))
},
cond=list("n"=10),
nsim=10, N=10, method="maximinLHS",
lb=c("mu"=-1.5,"sd"=0), ub=c("mu"=2,"sd"=1))
# setup the QL data model using defaults
qldata <- setQLdata(sim,verbose=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.