Learn R Programming

rtrim (version 2.3.1)

gof: Extract TRIM goodness-of-fit information.

Description

trim computes three goodness-of-fit measures:

  • Chi-squared

  • Likelihood ratio

  • Akaike Information content

Usage

gof(x)

# S3 method for trim gof(x)

Value

a list of type "trim.gof", containing elements chi2, LR

and AIC, for Chi-squared, Likelihoof Ratio and Akaike informatiuon content, respectively.

Arguments

x

an object of class trim (as returned by trim)

See Also

Other analyses: coef.trim(), confint.trim(), index(), now_what(), overall(), overdispersion(), plot.trim.index(), plot.trim.overall(), plot.trim.smooth(), results(), serial_correlation(), summary.trim(), totals(), trendlines(), trim(), vcov.trim(), wald()

Examples

Run this code
data(skylark)
z <- trim(count ~ site + time, data=skylark, model=2)
# prettyprint GOF information
gof(z)

# get individual elements, e.g. p-value
L <- gof(z)
LR_p <- L$LR$p # get p-value for likelihood ratio

Run the code above in your browser using DataLab