Description Usage Arguments Details Value Author(s) Examples
Aggregate the data for quasi-likelihood estimation
1 2 |
runs |
list or matrix of simulation results obtained from |
X |
list or matrix of (design) points, i.e. model parameters |
var.type |
name of variance matrix approximation type: " |
Nb |
number of bootstrap samples, |
na.rm |
if |
verbose |
if |
The function aggregates all neccessary data for quasi-likelihood estimation storing the
sample points 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 point unless 'var.type
'
equals "const
" in which case a constant variance matrix approximation is expected to be given by the user in function qle
.
The Cholesky decompositions are used for an average approximation of the variance matrices of the statistics when calculating the
quasi-score vector or any type of function criterion. If these fail for any reason we try to ignore, if possible, the corresponding sample
points and exclude these from all subsequent computations. Unless a constant variance matrix estimate is used, the default is to approximate the
variance matrix at any model parameter by either a kriging approximation of the Cholesky terms (kriging the variance matrix) or as an average
over all sampled variance matrices (variance matrix average approximation) 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 simulation runs ( |
var |
Simulation variances of statistics ( |
L |
if applicable, Cholesky decomposed terms of variance matrices of statistics (k=1,...,(m*(m+1)/2)) |
Lb |
if applicable, bootstrap variances of covariances |
where 'p
' denotes the number of user defined statistics and 'q
' the problem dimension, that is,
the number of statistical model parameters to be estimated.
The following items are stored as attributes:
type |
see above |
nsim |
number of simulations spent at each (design) point |
xdim |
length of model parameter |
nWarnings |
Number of warnings during simulation runs |
nErrors |
Number of errors during simulation runs |
nIgnored |
List of parameters ignored due to errors |
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.