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.
# Poisson model. Repeatability setting. iccpois<-icc_counts(EPP,y="Social",id="id") GOF_check(iccpois) # Zero-inflated Poisson model. Repeatability setting icczip<-icc_counts(EPP,y="Social",id="id",fam="zip") GOF_check(icczip)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.