quasiDeviance: Quasi-deviance computation

Description Usage Arguments Details Value Author(s) Examples

View source: R/krige.R


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


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



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


object of class QLmodel


variance matrix estimate of statistics (see details)


further arguments passed to covarTx


list of cross-validation models (see prefitCV)


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


currently ignored


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


if TRUE only the values of the QD are returned


logical, if TRUE (default) remove 'Na' values from the results


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


logical, TRUE for intermediate output


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 hypothesize about the true model parameter. A modified value of the QD, using the inverse of the variance of the quasi-score vector as a weighting 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. This can be further investigated by testing the hypothesis by function qleTest whether the estimated model parameter is the true.

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 estimate 'theta'. Note that, opposed to the MD, the QD does not support a constant variance matrix. However, if supplied, then 'Sigma' is used as a first estimate and, if 'qsd$krig.type'="var", prediction variances are also added (see also mahalDist).

Use of prediction variances

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

Alternatively, also CV-based prediction variances (with additional covariance models given by 'cvm') for each single statistic can be used to produce relatively robust 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 kriging the variance matrix of the statistics. Further, CV is generally recommended in all situations where it is important to obtain a robust estimate of the unkown model parameter.


Numeric vector of QD values or a list as follows:


quasi-deviance value


parameter estimate


quasi-information matrix


quasi-score vector


Jacobian of sample average statistics


estimated variance of quasi-score, if applicable


observed quasi-information


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 vector given the observed statistics and serves as a measure of accuracy (see [1] and the vignette, Sec. 3.2) of the approximation at some point.


M. Baaske


quasiDeviance(c(2,1), qsd)

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