anova.lcc: Compare Likelihoods of Fitted Models from an 'lcc' Object

View source: R/methods.R

anova.lccR Documentation

Compare Likelihoods of Fitted Models from an lcc Object

Description

Compares the fit of different longitudinal concordance correlation models (lcc objects). When comparing multiple models, the function returns a data frame with degrees of freedom, log-likelihood, AIC, and BIC for each model. For a single model, it returns F-values and P-values for fixed terms in the model.

Usage

## S3 method for class 'lcc'
anova(object, ..., test = TRUE, type = c("sequential", "marginal"), 
  adjustSigma = TRUE, verbose = FALSE)

Arguments

object

An object inheriting from class lcc or lme.

...

Other optional fitted model objects inheriting from classes "lcc" or "lme".

test

Logical; if TRUE, performs likelihood ratio tests to compare models. Defaults to TRUE.

type

Character string specifying the type of sum of squares for F-tests. Options are "sequential" or "marginal". Defaults to "sequential".

adjustSigma

Logical; if TRUE, adjusts the residual standard error for maximum likelihood estimation. Defaults to TRUE.

verbose

Logical; if TRUE, prints additional model details. Defaults to FALSE.

Details

This function is an adaptation from anova.lme. It assesses whether the addition of terms significantly improves model fit.

See Also

lcc, summary.lcc

Examples

## Not run: 
fm1.aov <- lcc(data = hue, subject = "Fruit", resp = "H_mean", method = "Method", 
               time = "Time", qf = 2, qr = 1)
fm2.aov <- update(fm1.aov, qr = 2)
anova(fm1.aov, fm2.aov)

## End(Not run)

## Not run: 
fm3.aov <- update(fm2.aov, REML = FALSE)
fm4.aov <- update(fm2.aov, REML = FALSE, qf = 3)
anova(fm3.aov, fm4.aov)

## End(Not run)

## Not run: 
fm5.aov <- update(fm2.aov, var.class = varExp, weights.form = "time")
anova(fm1.aov, fm2.aov, fm5.aov)

## End(Not run)


Prof-ThiagoOliveira/lcc documentation built on Dec. 9, 2023, 12:10 a.m.