QLmodel: Construct quasi-likelihood approximation

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
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 otherwise 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 further output

Details

The function aggregates all required information for quasi-likelihood estimation, 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 as defined by setCovModel. The user has the choice whether or not to make use of 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 TRUE, then a kriging procedure calculating prediction variances 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 fitting.

Author(s)

M. Baaske

See Also

getQLmodel, updateCovModels

Examples

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

# We simply re-use the stored normal data and fit again: 
# fit generalized covariance model to the data using
# simulation variances as local nugget variances
mods <- fitSIRFk(qsd$qldata, verbose=TRUE)

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

mbaaske/qle documentation built on Feb. 3, 2018, 11:02 a.m.