Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function is currently a wrapper for methods implemented in the package slouch
.
1 |
data |
A vector of continuous species trait data. This vector needs to be of the same length and same order as phylo$tip.label. |
phylo |
An object of class 'phylo'. |
model |
The model to fit. Can be one of |
time.units |
A character defining the units of the edge lengths of the phylogentic tree. Defaults to "Ma" |
Fits evolutionary models to species trait data using the methods implemented in the package slouch
and returns a model fit object (class ctmm) that is used for plotting a fitted model against an emprical variogram.
Returns a model fit object (class ctmm) that is used for plotting a fitted model against an emprical variogram.
Running summary
on the fitted model is not currently meaningful.
M. J. Noonan, C. H. Fleming.
Noonan, M. J., Fagan, W. F., and Fleming C. H. (2021) “A semi-variance approach to visualising phylogenetic autocorrelation”. Methods in Ecology and Evolution, in press.
vignette("variogram", package = "ctpm")
, plot.variogram
, %#%
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #Load package and data
library(ctpm)
data("moid_traits")
data("musteloids")
#Extract the trait of interest from the full dataset
SSD <- moid_traits$SSD
#Calculate variogram
SVF <- variogram(SSD, musteloids)
#Fit the model
FIT <- ctpm.fit(SSD, musteloids, model = "BM")
#Plot the variogram and fitted model
plot(SVF, FIT)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.