The randomised quantile residuals ("RQR", from Dunn and Smyth, 1996) are defined by their marginal distribution function (marginality is over other species observations within that site; see Foster et al, in prep). The result is one residual per species per site and they all should be standard normal variates. Within a site they are likely to be correlated (as they share a common latent factor), but across sampling locations they will be independent. The deviance residuals (as used here), are actually just square root of minus two times the log-likelihood contribution for each sampling location. We do not subtract the log-likelihood of the saturated model as, at the time of writing, we are unsure what this log-likelihood should be (latent factors confuse things here). This implies that the residuals will not have mean zero and their variance might also be heteroskedastic. This was not realised when writing the original RCP paper (Foster et al, 2013), obviously. We still believe that these residuals have some utility, but we are unsure where that utility stops. For general useage, the "RQR" residuals should probably be preferred.
# S3 method for regional_mix residuals(object, ..., type = "RQR", quiet = FALSE, mc.cores = 1)
object | A regional_mix model |
---|---|
type | What type of residuals to plot? 'RQR'; random quantile residuals or 'deviance' residuals. |
quiet | Run in quiet mode. |
mc.cores | the number of cores to farm the jobs out to. |
\dots | Additional arguments for residuals function |
Dunn, P.K. and Smyth G.K. (1996) Randomized Quantile Residuals. Journal of Computational and Graphical Statistics 5: 236--244. Foster, S.D., Givens, G.H., Dornan, G.J., Dunstan, P.K. and Darnell, R. (2013) Modelling Regions of Common Profiles Using Biological and Environmental Data. Environmetrics 24: 489--499. DOI: 10.1002/env.2245 Foster, S.D., Hill, N.A. and Lyons, M., 2017. Ecological grouping of survey sites when sampling artefacts are present. Journal of the Royal Statistical Society: Series C (Applied Statistics), 66(5), pp.1031-1047.