quasiDeviance: Quasi-deviance computation

Description Usage Arguments Details Value Author(s) Examples

View source: R/krige.R

Description

The function computes the quasi-deviance (QD) at parameters (called points) of the parameter search space including the computation of the quasi-score vector and optionally its variance matrix.

Usage

1
2
3
quasiDeviance(points, qsd, Sigma = NULL, ..., cvm = NULL, obs = NULL,
  inverted = FALSE, check = TRUE, value.only = FALSE, na.rm = TRUE,
  cl = NULL, verbose = FALSE)

Arguments

points

list or matrix of points where to compute the QD (a numeric vector is considered to be a (multidimensional) point)

qsd

object of class QLmodel

Sigma

variance matrix estimate of statistics (see details)

...

further arguments passed to covarTx

cvm

list of cross-validation models (see prefitCV)

obs

numeric vector of observed statistics, this overwrites 'qsd$obs', if supplied

inverted

logical, FALSE (default), currently ignored

check

logical, TRUE (default), whether to check input arguments

value.only

if TRUE only the values of the QD are returned

na.rm

logical, if TRUE (default) remove 'Na's from the result

cl

cluster object, NULL (default), of class MPIcluster, SOCKcluster, cluster

verbose

logical, TRUE for intermediate output

Details

The function calculates the QD (see [1]). It is the primary function criterion to be minimized for estimating the unknown model parameter by qle and involves the computation of the quasi-score and quasi-information matrix at a particular parameter. From a statistical point of view, the QD can be seen as a generalization to the efficient score statistic (see [3] and the vignette) and is used as a decision rule in the estimation function qle in order to hypothesise about the true model parameter. A modified value of the QD, using the inverse of the variance of the quasi-score (as a weight matrix) is stored in the result 'qval'.

Quasi-deviance values which are relatively small (compared to the empirical quantiles of its approximate chi-squared distribution) suggest a solution to the quasi-score equation and hence could identify the unknown model parameter in some probabilistic sense. Estimated parameters including different observed statistics can be investigated by a MC goodness-of-fit test, see qleTest.

Further, if we use a weighted variance average approximation of statistics (see covarTx), then the QD value is calculated rather locally w.r.t. to an estimated parameter 'theta'. Note that, opposed to the MD, a constant variance matrix is not applicable to the computation of the QD. However, if supplied, 'Sigma' is used as a first estimate and in case of 'qsd$krig.type'="var" prediction variances of the involved statistics at 'points' are added as diagonal terms (see also mahalDist).

Use of prediction variances

In order to not only account for the simulation variance but additionally for the approximation error of the quasi-score vector we include the prediction variances of the involved statistics either based on a cross-validation or kriging approach unless 'qsd$krig.type' equals "dual". If 'cvm' is not given, then the prediction variances are obtained based on the kriging procedure applied to the statistics. Using prediction variances the variance matrix 'varS' of the quasi-score vector is part of the return list and omitted otherwise. Besides the quasi-information matrix the observed quasi-information matrix (as a numerically derived Jacobian, given by 'Iobs', of the quasi-score vector) is also returned. A good match between those two matrices suggests an approximate root if the corresponding QD value is relatively small. This can be further investigated using the function checkMultRoot.

Alternatively, also CV-based prediction variances (which involve additional covariance models given by 'cvm' for each left out sample point) for each single statistic can be used to produce relatively robust parameter estimation results but for the price of much higher computational costs. In practice this might overcome the general tendency inherent to kriging to underestimate the prediction variances of the sample means of the statistics and should be used if one decides using kriging for the approximation of the variance matrix.

Value

Numeric vector of QD values, if values only, or a list with elements:

value

quasi-deviance value

par

parameter estimate

I

quasi-information matrix

score

quasi-score vector

jac

Jacobian of sample average statistics

varS

estimated variance of quasi-score, if applicable

Iobs

observed quasi-information

qval

quasi-deviance using the inverse of 'varS' as a weighting matrix

The matix 'Iobs' is called the \emph{observed quasi-information} (see [2, Sec. 4.3]), which, in our setting, can be calculated at least numerically as the Jacobian of the quasi-score vector. Further, 'varS' denotes the approximate variance-covariance matrix of the quasi-score given the observed statistics and serves as a measure of estimation precision (see [1] and the vignette, Sec. 3.2).

Author(s)

M. Baaske

Examples

1
2
3
data(normal)
quasiDeviance(c(2,1), qsd)
 

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