Learn R Programming

caper (version 0.4)

pgls-methods: Generic model methods for 'pgls' models.

Description

These are simple summary methods, accessor functions and summary and print methods for 'pgls' models.

Usage

## S3 method for class 'pgls':
coef(object, ...)
## S3 method for class 'pgls':
residuals(object, phylo = FALSE, ...)
## S3 method for class 'pgls':
fitted(object, ...)
## S3 method for class 'pgls':
predict(object, pred.x, ...)
## S3 method for class 'pgls':
summary(object, ...)
## S3 method for class 'pgls':
print(x, digits = max(3, getOption("digits") - 3), ...)
## S3 method for class 'summary.pgls':
print(x, digits = max(3, getOption("digits") - 3), ...)

Arguments

object
An object of class 'pgls'.
x
An object of class 'pgls'.
phylo
Return phylogenetically corrected residuals or ordinary residuals (see details).
pred.x
Alternative data for predicting from 'pgls' models.
digits
Number of digits to show in summary methods.
...
Further arguments to methods.

Value

  • The 'summary' method returns an object of class 'summary.pgls' containing:
  • callThe original function call creating the model.
  • dfA vector of the degrees of freedom used to estimate parameters and the residual degrees of freedom.
  • sigmaThe square root of the estimated variance of the random error.
  • residualsThe phylogenetically corrected residuals.
  • coefficientsA table of model coefficient, standard errors and t values.
  • paramA vector of branch length parameters used in the model.
  • mlValsA vector showing which branch length parameters have been optimised.
  • param.CIA list of length three containing confidence intervals and p values on parameter bounds for each parameter.
  • fstatisticA vector of the F value, numerator and denominator degrees of freedom for the model.
  • r.squaredThe r^2 for the model.
  • adj.r.squaredThe adjusted r^2 for the model.

Details

Phylogenetically corrected residuals from 'pgls' models [TODO].

See Also

pgls

Examples

Run this code
data(shorebird)
shorebird <- comparative.data(shorebird.tree, shorebird.data, Species, vcv=TRUE, vcv.dim=3)
mod1 <- pgls(log(Egg.Mass) ~ log(M.Mass) * log(F.Mass), shorebird) 
print(mod1)

mod1.sum <- summary(mod1)
print(mod1.sum)

Run the code above in your browser using DataLab