Test for over/underdispersion
This function performs a simulation-based test for over/underdispersion
an object with simulated residuals created by
whether to test for "overdispersion", "underdispersion", or "both"
whether to plot output
This test compares the approximate deviance (via squared pearson residuals) with the same quantity from a number of simulated models. It is MUCH slower than the parametric alternative
testOverdispersionParametric, but potentially more exact in situations where one would expect problems with the chi2 test employed in the parametric test