Class and methods to handle Phylogenetic Eigenvector Maps (PEM).
# S3 method for PEM
print(x, ...)# S3 method for PEM
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for PEM
predict(
object,
targets,
lmobject,
newdata,
interval = c("none", "confidence", "prediction"),
level = 0.95,
...
)
A PEM-class
object contains:
The graph-class
object that was used to
build the PEM (see PEM.build
).
A logical
vector specifying which of the
vertices are tips.
The influence matrix for those vertices that are tips.
The number of edges.
The number of species (tips).
The column-centred influence matrix.
The column means of B
.
Edge lengths.
The steepness parameter (see PEM.build
for
details).
The relative evolution rate along the edges (see
PEM.build
for details).
Edge weights.
The weighted and column-centred influence matrix.
The singular values of BcW
.
The eigenvectors (left singular vectors) of BcW
.
The right singular vectors of BcW
.
In addition to these standard component, function,
PEM.fitSimple
and PEM.forcedSimple
add the
following members, which are necessary to make predictions:
The variances of response data (one value for each response variable).
A copy of the response data.
The list returned by optim
.
The estimated weighting parameters are also given as an edge property.
A PEM-class
object containing a Phylogenetic
Eigenvector Map.
Additional parameters to be passed to the method. Currently ignored.
Included for method consistency reason; ignored.
Included for method consistency reason; ignored.
A PEM-class
object.
Output of getGraphLocations
.
An object of class ‘lm’ (see lm
for
details).
Auxiliary trait values.
The kind of limits (confidence or prediction) to return with
the predictions; interval="none"
: do not return a confidence interval.
Probability associated with the confidence of prediction interval.
print(PEM)
: Print PEM-class
A print method for PEM-class objects.
as.data.frame(PEM)
: Method as.data.frame
for PEM-class Objects
A method to extract the phylogenetic eigenvectors from a PEM-class object.
predict(PEM)
: Predict Method for PEM-class Objects
A predict method to predict species trait values using Phylogenetic Eigenvector Maps.
tools:::Rd_package_author("MPSEM") Maintainer: tools:::Rd_package_maintainer("MPSEM")
The print.PEM
method provides the number of eigenvectors, the
number of observations these vectors are spanning, and their associated
eigenvalues.
The as.data.frame.PEM
method extracts the eigenvectors from the
object and allows one to use PEM-class
objects as data
parameter in function such as lm
and glm
.
The predict.PEM
method is a barebone interface to make predictions. It
must be given species locations with respect to the phylogenetic graph
(target
), which are provided by function
getGraphLocations
and a linear model in the form of an object
from lm
. The user must provide auxiliary trait values if
lmobject
involves such traits.
Guénard, G., Legendre, P., and Peres-Neto, P. 2013. Phylogenetic eigenvector maps: a framework to model and predict species traits. Methods in Ecology and Evolution 4: 1120-1131
PEM-functions