
Model fit diagnostics
spDiag.RdThe function spDiag calculates measurements of model fit for
objects of class NNGP and PGLogit.
Arguments
- object
an object of class
NNGPorPGLogit.- sub.sample
an optional list that specifies the samples to included in the computations. Valid tags are
start,end, andthin. Given the value associated with the tags, the sample subset is selected usingseq(as.integer(start), as.integer(end), by=as.integer(thin)). The default values arestart=floor(0.5*n.samples),end=n.samplesandthin=1. Ifsub.samplesis not specified, then it is taken fromobject, or, if not aviable inobjectthe default values ofstart,end, andthinare used. Note, if theobjectis aNNGPresponsemodel andnis large, then computing the replicated data needed forGPDandGRScan take a long time.- ...
currently no additional arguments.
Value
A list with the following tags:
- DIC
a data frame holding Deviance information criterion (DIC) and associated values. Values in
DICincludeDICthe criterion (lower is better),Da goodness of fit, andpDthe effective number of parameters, see Spiegelhalter et al. (2002) for details.- GPD
a data frame holding D=G+P and associated values. Values in
GPDincludeGa goodness of fit,Pa penalty term, andDthe criterion (lower is better), see Gelfand and Ghosh (1998) for details.- GRS
a scoring rule, see Equation 27 in Gneiting and Raftery (2007) for details.
- WAIC
a data frame hold Watanabe-Akaike information criteria (WAIC) and associated values. Values in
WAICincludeLPPDlog pointwise predictive density,P.1penalty term defined in unnumbered equation above Equation (11) in Gelman et al. (2014),P.2an alternative penalty term defined in Equation (11), and the criteriaWAIC.1andWAIC.2(lower is better) computed usingP.1andP.2, respectively.- y.rep.samples
if
y.rep.samplesinobjectwere not used (or not available), then the newly computedy.rep.samplesis returned.- y.fit.samples
if
y.fit.samplesinobjectwere not used (or not available), then the newly computedy.fit.samplesis returned.- s.indx
the index of samples used for the computations.
References
Finley, A.O., A. Datta, S. Banerjee (2022) spNNGP R Package for Nearest Neighbor Gaussian Process Models. Journal of Statistical Software, doi:10.18637/jss.v103.i05 .
Gelfand A.E. and Ghosh, S.K. (1998). Model choice: a minimum posterior predictive loss approach. Biometrika, 85:1-11.
Gelman, A., Hwang, J., and Vehtari, A. (2014). Understanding predictive information criteria for Bayesian models. Statistics and Computing, 24:997-1016.
Gneiting, T. and Raftery, A.E. (2007). Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102:359-378.
Spiegelhalter, D.J., Best, N.G., Carlin, B.P., van der Linde, A. (2002). Bayesian measures of model complexity and fit (with discussion). Journal of the Royal Statistical Society, Series B., 64:583-639.
Author
Andrew O. Finley finleya@msu.edu,
Sudipto Banerjee sudipto@ucla.edu