Learn R Programming

DHARMa (version 0.1.3)

createDHARMa: Convert simulated residuals to a DHARMa object

Description

Convert simulated residuals to a DHARMa object

Usage

createDHARMa(scaledResiduals = NULL, simulatedResponse = NULL, observedResponse = NULL, fittedPredictedResponse = NULL, integerResponse = F)

Arguments

scaledResiduals
optional scaled residuals from a simulation, e.g. Bayesian p-values. If those are not provided, simulated and true observations have to be provided.
simulatedResponse
matrix of observations simulated from the fitted model - row index for observations and colum index for simulations
observedResponse
true observations
fittedPredictedResponse
fitted predicted response. Optional, but will be neccessary for some plots. If scaled residuals are Bayesian p-values, using the median posterior prediction as fittedPredictedResponse is recommended.
integerResponse
if T, noise will be added at to the residuals to maintain a uniform expectations for integer responses (such as Poisson or Binomial). Unlike in simulateResiduals, the nature of the data is not automatically detected, so this MUST be set by the user appropriately

Details

The use of this function is to convert simulated residuals (e.g. from a point estimate, or Bayesian p-values) to a DHARMa object, to make use of the plotting / test functions in DHARMa