surfaceAICPlot {surface} | R Documentation |
Plot the AIC Throughout a SURFACE Analysis
Description
Plots a line graph showing how the AICc changed over the forward and backward phases of a SURFACE analysis. surfaceAICPlot
can optionally show the change in the deviance or 'partial AICc' for each trait separately as well as for the analysis as a whole. surfaceAICMultiPlot
plots lines from multiple runs on the same plot, allowing comparison among analyses done on alternate tree topologies or with stochasticity added using sample_shifts
Usage
surfaceAICPlot(fwd = NULL, bwd = NULL, out = NULL, summ = NULL,
traitplot = "none", cols = NULL, daic = FALSE, ...)
surfaceAICMultiPlot(fwd = NULL, bwd = NULL, out = NULL, summ = NULL,
cols = NULL, daic = FALSE, ...)
Arguments
fwd |
List resulting from a |
bwd |
List resulting from a |
out |
List resulting from a |
summ |
Object returned by |
traitplot |
String indicating what values to use to draw lines corresponding to individual traits: |
cols |
An optional character vector of colors for the AICc lines, used to color the different runs in |
daic |
A logical indicating whether to rescale all delta-AICc (and delta-deviance) values to the value from the starting model; defaults to |
... |
Additional arguments to be passed to the |
Details
If values are plotted on a trait-by-trait basis, either traitplot="dev"
or traitplot="aic"
can be specified. If traitplot="dev"
, the deviance (-2*log likelihood) at each step is shown for each trait. If traitplot="aic"
, a "partial AICc" at each step is shown for each of the m
traits, consisting of the deviance and 1/m of the "penalty" part of the overall AICc, where m is the number of traits. Note that this is not a proper statistical construct, but its property of adding to give the overall AICc can be useful in visualizing the patterns among traits
Value
Plots AIC values from a SURFACE analysis on the current graphics device
Author(s)
Travis Ingram
References
Ingram, T. & Mahler, D.L. (2013) SURFACE: detecting convergent evolution from comparative data by fitting Ornstein-Uhlenbeck models with stepwise AIC. Methods in Ecology and Evolution 4: 416-425.
Mahler, D.L., Ingram, T., Revell, L.J. & Losos, J.B. (2013) Exceptional convergence on the macroevolutionary landscape in island lizard radiations. Science 341: 292-295.
See Also
surfaceForward
, surfaceBackward
, surfaceSimulate
, surfaceSummary
, surfaceTreePlot
, surfaceTraitPlot
Examples
## Not run:
data(surfaceDemo)
tree<-surfaceDemo$tree
dat<-surfaceDemo$sim$dat
result<-runSurface(tree,dat)
surfaceAICPlot(result$fwd,result$bwd)
## End(Not run)