Description Usage Arguments Value Author(s) See Also Examples
Estimates regression parameters for a phylogenetic generalised least-squares analysis using the fast constrasts method (Felsenstein 1973; 1985; Freckleton 2012). This implementation is applicable for continuous traits only and not factors
1 2 3 4 5 6 7 8 |
formula |
A model formula with continuous variables only |
phy |
An object of class |
y |
A matrix of trait values with rownames corresponding to the phy tip labels, and column names corresponding to the formula variable names |
lambda |
Default is "ML" meaning the phylogenetic signal of the response variable will be estimated using restricted Maximum likelihood. If a numeric value between 0-1 is provided this will be used in the calculation of regression coefficients |
return.intercept.stat |
Logical. If |
meserr |
A vector (or matrix) of measurement error for each tip. This is only applicable to univariate analyses. |
A list containing the model, model summary, intercept, estimate of Lambda, model log-Likelihood, model AIC
Mark N Puttick and Rob Freckleton
1 2 3 4 5 6 7 8 9 | # Data and phylogeny
data(anolis.tree)
anolis.tree$node.label <- NULL
lm.data <- transformPhylo.sim(phy=anolis.tree, n=2, model="bm")
dat <- data.frame(x = lm.data[,1], y = lm.data[,2],
names = anolis.tree$tip, row.names = anolis.tree$tip)
picModel <- pic.pgls(formula=y ~ x,
phy=anolis.tree, y = dat, lambda=1,
return.intercept.stat=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.