lm-utils | R Documentation |
Utility functions to build linear models using Phylogenetic Eigenvector Maps among their explanatory variables.
model.data(
formula,
data,
...,
na.action = na.pass,
contrasts = NULL,
discard.intercept = TRUE
)
Psquare(obs, prd)
formula |
an object of class " |
data |
An optional data frame, list or environment (or object coercible
by |
... |
Additional parameters to be passed to the method. |
na.action |
A function (of the name of a function) for treating missing
values ( |
contrasts |
An optional list. See the |
discard.intercept |
A |
obs |
A numeric vector of observations. |
prd |
A numeric vector of model predictions. |
Function model.data
is useful to prepare data to be given as
response and auxiliary trait(s) to other functions such as
evolution.model.PEM
. In general, the implicit constant term
(intercept) is not useful and can be explicitly discarded.
A three-member list with member $y
(a vector or
matrix of response traits), member $x
(a matrix auxiliary traits
coded as numeric values), and member $terms
(A model
description).
A numeric value.
model.data()
: Model Data Preparation
Transforms data from various types into a list containing the response trait(s) and a strictly numeric auxiliary traits data matrix.
Psquare()
: Coefficient of Prediction
Calculates the prediction coefficient between observations and model predictions.
Guillaume Guénard [aut, cre] (<https://orcid.org/0000-0003-0761-3072>), Pierre Legendre [ctb] (<https://orcid.org/0000-0002-3838-3305>) Maintainer: Guillaume Guénard <guillaume.guenard@umontreal.ca>
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.