QLmodel: Construct the quasi-likelihood approximation model

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

View source: R/covariance.R

Description

Aggregate and construct the data for quasi-likelihood estimation

Usage

1
2
3
4
QLmodel(qldata, lb, ub, obs, mods, nfit = 1, cv.fit = TRUE,
  var.type = c("wcholMean", "cholMean", "wlogMean", "logMean", "kriging",
  "const"), useVar = TRUE, criterion = c("qle", "mahal"),
  verbose = FALSE)

Arguments

qldata

data frame of (initial) simulation results (see setQLdata)

lb

numeric vector of lower bounds defining the (hyper)box

ub

numeric vector of upper bounds defining the (hyper)box

obs

numeric vector of observed statistics

mods

list of (fitted) covariance models (see fitSIRFk)

nfit

number of cycles, nfit=1 (default), after which covariance parameters are re-estimated and otherwise only re-used

cv.fit

logical, TRUE (default), whether to re-fit CV models (re-estimate covariance parameters)

var.type

name of the variance approximation method (see covarTx)

useVar

logical, TRUE (default), whether to use prediction variances (see details)

criterion

global criterion function for sampling and minimization, either "qle" or "mahal"

verbose

logical, FALSE (default), whether to give intermediate output

Details

The function aggregates all required information for quasi-likelihood estimation and defines the input object to the function qle, stores the fitted covariance models of the sample means of the statistics and the type of variance matrix approximation. For an advanced setup of the estimation procedure and more involved statistical models this function explicitly offers the data structure to construct individual covariance models for each statistic, see setCovModel. The user has the choice whether or not to make use of kriging prediction variances by 'useVar' to account for the simulation error when constructing the approximation of the variance matrix and the quasi-score function. If useVar=TRUE, then a kriging procedure including the computation of prediction variances based on kriging is automatically used. Otherwise the so-called dual approach is employed which has some computational advantage if prediction variances are not required.

Value

An object of class QLmodel which stores the data frame of simulation results, bounds on the parameter space, covariance models for kriging, vector of observed statistics as well as options for kriging and covariance parameter estimation.

Author(s)

M. Baaske

See Also

getQLmodel, updateCovModels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(normal)

# As an example we re-use the stored normal data and fit 
# a generalized covariance model to the data using simulation
# variances as local variances for REML estimation.
mods <- fitSIRFk(qsd$qldata, verbose=TRUE)

# construct QL approximation model
qsd <- QLmodel(qsd$qldata,qsd$lower,qsd$upper,
			    c("T1"=2,"T2"=1),mods)

qle documentation built on May 2, 2019, 9:55 a.m.