These are simple summary methods, accessor functions and summary and print methods for 'pgls' models.
# S3 method for pgls
coef(object, ...)
# S3 method for pgls
residuals(object, phylo = FALSE, ...)
# S3 method for pgls
fitted(object, ...)
# S3 method for pgls
predict(object, newdata, ...)
# S3 method for pgls
summary(object, ...)
# S3 method for pgls
print(x, digits = max(3, getOption("digits") - 3), ...)
# S3 method for summary.pgls
print(x, digits = max(3, getOption("digits") - 3), ...)
# S3 method for pgls
nobs(object, ...)
The 'summary' method returns an object of class 'summary.pgls' containing:
The original function call creating the model.
A vector of the degrees of freedom used to estimate parameters and the residual degrees of freedom.
The square root of the estimated variance of the random error.
The phylogenetically corrected residuals.
A table of model coefficient, standard errors and t values.
A vector of branch length parameters used in the model.
A vector showing which branch length parameters have been optimised.
A list of length three containing confidence intervals and p values on parameter bounds for each parameter.
A vector of the F value, numerator and denominator degrees of freedom for the model.
The r^2 for the model.
The adjusted r^2 for the model.
An object of class 'pgls'.
An object of class 'pgls'.
Return phylogenetically corrected residuals or ordinary residuals (see details).
Alternative data for predicting from 'pgls' models.
Number of digits to show in summary methods.
Further arguments to methods.
Rob Freckleton, David Orme
Phylogenetically corrected residuals from 'pgls' models [TODO].
Note that the r^2 values reported by summary.pgls
have a specific interpretation. pgls
fits the intercept-only model for the data using _exactly_ the same covariance matrix (phylogeny plugged through any branch length transformations) as the fitted model to get a null model. The r-squared and adjusted r-squared that are reported therefore hold the covariance matrix constant, so show percentage of variance explained between a null model and the actual model given that precise model of trait change.
The actual ML null model for the data (optimising the BL transformation independently) might be different from this - but then the r squared values confound change in explanatory power from changing the model parameters and from changing the trait model.
pgls
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