Description Usage Arguments Details Value Author(s)
View source: R/dshm_diagnostics.R
dshm_diagnostics
computes the Hurdle model cumulative distribution function (CDF) and it plots it against the empirical distribution function (EDF). It also calculates Kolmogorov-Smirnov test statistics.
1 | dshm_diagnostics(model, mute = FALSE, plot = TRUE, plot.n = 1)
|
model |
Hurdle model fitted through |
mute |
If |
plot |
If |
plot.n |
The number of available plots. If |
The Hurdle model CDF is calculated using the following equation:
CDF(n) = (1 - p)(1 - λ) + pλCDF(P(n > 0))
Where n are the number of observations, p is the probability of presence, λ is 0 for absence and 1 for presence, and CDF(P(n > 0)) is the zero-trucated Poisson cumulative distribution function, i.e the probability of observing x given the zero-trucated Poisson parameter.
For more information about fitting Hurdle models you can download the fitting_Hurdle.pdf tutorial.
Two plots for CDF vs. EDF and observed values vs. fitted values. Kolmogorov-Smirnov test statistics and p-value.
Filippo Franchini filippo.franchini@outlook.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.