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

anova.lccR Documentation

Compare Likelihoods of Fitted Models from an lcc Object

Description

Compare Likelihoods of Fitted Models from an lcc Object

Usage

## S3 method for class 'lcc'
anova(object, ..., test, type, adjustSigma,
  verbose)

Arguments

object

an object inheriting from class lcc or lme, representing a fitted longitudinal concordance correlation function.

...

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

test

an optional logical value controlling whether likelihood ratio tests should be used to compare the fitted models represented by object and the objects in .... Defaults to TRUE.

type

an optional character string specifying the type of sum of squares to be used in F-tests for the terms in the model. If sequential, the sequential sum of squares obtained by including the terms in the order they appear in the model is used; else, if marginal, the marginal sum of squares obtained by deleting a term from the model at a time is used. This argument is only used when a single fitted object is passed to the function. Partial matching of arguments is used, so only the first character needs to be provided. Defaults to sequential.

adjustSigma

an optional logical value. If TRUE and the estimation method used to obtain object was maximum likelihood, the residual standard error is multiplied by sqrt(nobs/(nobs - npar)), converting it to a REML-like estimate. This argument is only used when a single fitted object is passed to the function. Default is TRUE.

verbose

an optional logical value. If TRUE, the calling sequences for each fitted model object are printed with the rest of the output, being omitted if verbose = FALSE. Defaults to FALSE.

Details

This function is an adaptation from the anova.lme. For more details see methods for nlme.

Value

If just one lcc model object is declared, a data frame with the numerator degrees of freedom, denominator degrees of freedom, F-values, and P-values for the fixed terms in the model. Otherwise, when multiple lcc fitted objects are being compared, a data frame with the degrees of freedom, the (restricted) log-likelihood, the Akaike Information Criterion (AIC), and the Bayesian Information Criterion (BIC) of each object is returned.

Author(s)

Thiago de Paula Oliveira, thiago.paula.oliveira@alumni.usp.br

See Also

lcc, summary.lcc

Examples

## Not run: 
## Testing random effects
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: 
# Testing fixed effects
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: 
# Comparing the 3 lcc models
fm5.aov <- update(fm2.aov,  var.class = varExp, weights.form = "time")
anova(fm1.aov, fm2.aov, fm5.aov)

## End(Not run)


lcc documentation built on Aug. 25, 2022, 5:08 p.m.

Related to anova.lcc in lcc...