GOF: Conduct goodness of fit tests

Description Usage Arguments Examples

Description

Includes a number of common goodness of fit measures to compare different GRT models.

Usage

1
GOF(grtMod, teststat = "X2", observed = NULL)

Arguments

grtMod

a grt object

teststat

a string indicating which statistic to use in the test. May be one of the following:

  • 'X2'for a chi-squared test

  • 'G2'for a likelihood-ratio G-test

  • 'AIC'for Akaike information criterion score

  • 'AIC.c'for the AIC with finite sample size correction

  • 'BIC'for Bayesian information criterion score

observed

optional, to provide a matrix of observed frequencies if no fit conducted.

Examples

1
2
3
4
5
6
7
data(thomas01a)
fit1 <- fit.grt(thomas01a)
fit2 <- fit.grt(thomas01a, PI = 'same_rho')

# Take the model with the lower AIC
GOF(fit1, teststat = 'AIC')
GOF(fit2, teststat = 'AIC')

mdsdt documentation built on May 2, 2019, 2:46 a.m.

Related to GOF in mdsdt...