caic-methods: Anova and model checking methods for independent contrast...

anova.caicR Documentation

Anova and model checking methods for independent contrast models.

Description

These functions provide ANOVA tables and model comparison using ANOVA and AIC, along with standard model diagnostic plots and accessor functions for phylogenetic independent contrast objects.

Usage

## S3 method for class 'caic'
anova(object, ...)
## S3 method for class 'caiclist'
anova(object, ..., scale=0, test='F')
## S3 method for class 'caic'
logLik(object, ...)
## S3 method for class 'caic'
predict(object, ...)
## S3 method for class 'caic'
residuals(object, ...)
## S3 method for class 'caic'
coef(object, ...)
## S3 method for class 'caic'
plot(x, ...)

Arguments

object

An object of class 'caic'.

scale

A character string specifying the test statistic to be used. Can be one of "F", "Chisq" or "Cp", with partial matching allowed, or NULL for no test.

test

numeric. An estimate of the noise variance sigma^2. If zero this will be estimated from the largest model considered.

x

An object of class 'caic'.

...

Further argument to be passed to methods.

Details

The 'anova' method provides access to single anova tables for a model and to comparison of lists of models. The 'logLik' method provides access to the log likelihood of the 'caic' model and hence to AIC comparison of models.

The 'plot' method uses the standard set of model diagnostic plots for linear models. It is also wise to check the evolutionary assumptions of independent contrast models using the 'caic' specific diagnostic plots. The 'predict' and 'residuals' functions provide access to these parts of the 'caic' object.

Author(s)

David Orme

See Also

crunch, brunch,macrocaic,caic.diagnostics

Examples

data(shorebird)
shorebird.data$lgEgg.Mass <- log(shorebird.data$Egg.Mass)
shorebird.data$lgM.Mass <- log(shorebird.data$M.Mass)
shorebird.data$lgF.Mass <- log(shorebird.data$F.Mass)
shorebird <- comparative.data(shorebird.tree, shorebird.data, Species)

cMod1 <- crunch(lgEgg.Mass ~ lgM.Mass * lgF.Mass, data=shorebird)
cMod2 <- crunch(lgEgg.Mass ~ lgM.Mass + lgF.Mass, data=shorebird)
cMod3 <- crunch(lgEgg.Mass ~ lgM.Mass , data=shorebird)

anova(cMod1, cMod2, cMod3)
AIC(cMod1, cMod2, cMod3)

plot(cMod3)

caper documentation built on Sept. 26, 2023, 5:10 p.m.