stratEst.check: Check model assumptions

View source: R/stratEst_check.R

stratEst.checkR Documentation

Check model assumptions

Description

Check model assumptions

Usage

stratEst.check(model, chi.tests = FALSE, bs.samples = 100, verbose = FALSE)

Arguments

model

a fitted model of class stratEst.model.

chi.tests

a logical. If TRUE chi square tests of global and local model fit are performed. Default is FALSE.

bs.samples

an integer. The number of parametric bootstrap samples for the chi square tests. Default is 100.

verbose

a logical, if TRUE messages of the checking process are printed to the console. Default is FALSE.

Details

The function for model checking of the package.

Value

A list of check results with the following elements:

fit

a matrix. Contains the log likelihood, the number of free model parameters, and the value of the three information criteria.

chi.global

a matrix. The results of the chi square test for global model fit.

chi.local

a matrix. The results of the chi square test for local model fit.

References

Wang Z, Xu B, Zhou HJ (2014). "Social Cycling and Conditional Responses in the Rock-Paper-Scissors Game." Scientific Reports, 4(1), 2045-2322.

Examples

## Fit and check a mixture model for the rock-paper-scissors data of Wang, Xu, and Zhou (2014).
strategies.mixture = strategies.RPS[c("nash","imitate")]
model.mixture <- stratEst.model(data.WXZ2014,strategies.mixture)
model.mixture.check <- stratEst.check( model.mixture )
print(model.mixture.check$fit)

stratEst documentation built on Dec. 1, 2022, 1:13 a.m.