Compute likelihood ratio tests of two fitted model objects
Source:R/fit_summary.R
anova.s4t_cjs_ml.RdCompute analysis of variance table.
Usage
# S3 method for class 's4t_cjs_ml'
anova(object, ...)Value
Returns a data frame with the difference in degrees of freedom, test statistic (chi-squared), and p-value for the likelihood ratio tests between the full (assumed to be the model with the largest degrees of freedom) and reduced model.
Examples
if (FALSE) { # \dontrun{
sim.dat <- sim_simple_s4t_ch(N = 2000)
m1 <- fit_s4t_cjs_ml(p_formula = ~ t,
theta_formula = ~ a1 * a2 * s * j,
ageclass_formula = ~ FL,
fixed_age = TRUE,
s4t_ch = sim.dat$s4t_ch)
m2 <- fit_s4t_cjs_ml(p_formula = ~ t * a1 * a2,
theta_formula = ~ a1 * a2 * s * j,
ageclass_formula = ~ FL,
fixed_age = TRUE,
s4t_ch = sim.dat$s4t_ch)
anova(m1, m2)
} # }