GOF_check: Goodness of fit for GLMM

View source: R/gof_functions.R

GOF_checkR Documentation

Goodness of fit for GLMM


Assessment of goodness of fit for GLMM


GOF_check(x, nsim = 100, alpha = 0.05)



An object of clas iccc.


Number of simulations to run. Default is set to 100.


Level of significance


Randomized quantile residuals are computed for the fitted model. Simulations based on the fitted model are generated and the model is refitted to each simulated dataset. Envelopes for RQR are built as the appropriate quantile (in relation to the level fo significance) of RQR from the refitted models. Additionally, a test for dispersion and zero inflation are carried out by comparing the RQR dispersion and the number of zeros from the original model and data to those from the refitted models and simulated data.


An object of class GOF for which method plot is available. A list with the following components:

  • plot_env. Plot of RQR envelopes with the original RQR.

  • plot_var. Plot of the simulated RQR dispersion.

  • plot_zi. Plot of the count of zeros in the simulated datasets.

  • res_var. Dispersion of RQR from the original sample.

  • pval_var. Proportion of simulated RQR dispersion that are greater than the original dispersion that can be interpreted as a simulated P-value to check the goodness of fit on dispersion.

  • zero_count. Count of zeros in the original sample.

  • pval_zi. Proportion of simulated zero count that are greater than that of the original sample. It can be interpreted as a simulated P-value to check the hypothesis of zero-inflation.

See Also

plot.GOF(), DispersionTest(),ZeroTest()


# Poisson model. Repeatability setting.
# Zero-inflated Poisson model. Repeatability setting

iccCounts documentation built on June 9, 2022, 5:06 p.m.