modFit | R Documentation |
Formats a brief summary of model fit for a glm
or loglm
object, showing
the likelihood ratio Chisq (df) value and or AIC. Useful for inclusion in a plot
title or annotation.
modFit(x, ...)
## S3 method for class 'glm'
modFit(x, stats="chisq", digits=2, ...)
## S3 method for class 'loglm'
modFit(x, stats="chisq", digits=2, ...)
x |
A |
... |
Arguments passed down |
stats |
One or more of |
digits |
Number of digits after the decimal point in displayed statistics. |
A character string containing the formatted values of the chosen statistics.
Michael Friendly
Summarise
(soon to be deprecated),
LRstats
data(Mental)
require(MASS)
(Mental.tab <- xtabs(Freq ~ ses + mental, data=Mental))
(Mental.mod <- loglm(~ses + mental, Mental.tab))
Mental.mod
modFit(Mental.mod)
# use to label mosaic()
mosaic(Mental.mod, main=paste("Independence model,", modFit(Mental.mod)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.