PlotRCPHistory: Plot the search path from a recursive clade partition search

Description Usage Arguments Value Examples

View source: R/PlotRCPHistory.R

Description

This function produces a list of tree-plots representing the search-path during a recrusive clade partition search. Each plot has a label on top showing:

a number in parentheses (i) describes iteration i of the main loop.

the score, the log-likelihood and the number of parameters of the model.

a coloured node with a number i is the partition root for the iteration.

Nodes in grey represent the potential shift points - these are descendants from the partition root, which have not been "cut out" by a shift and have at least q descendants, themselves.

Letters in braces denote the candidate model-types for each shift-node.

Usage

1
2
3
4
5
PlotRCPHistory(fit, sizeGreyNodepoints = 2.2,
  sizeColorNodepoints = 2.2, sizeBlackAllowedModelTypes = 1.4,
  sizeColorAllowedModelTypes = 1.4, sizeRankInQueue = 1.4,
  vjustBlackAllowedModelTypes = -1.6,
  vjustColorAllowedModelTypes = -1.6, ...)

Arguments

fit

an object of S3 class 'PCMFitModelMappings' returned by a call to 'PCMFitMixed'.

sizeGreyNodepoints, sizeColorNodepoints, sizeBlackAllowedModelTypes, sizeColorAllowedModelTypes, sizeRankInQueue, vjustBlackAllowedModelTypes, vjustColorAllowedModelTypes

graphical parameters (see function description).

...

additional parameters passed to PCMTreePlot.

Value

a list of annotated ggtree plots. Some of the entries in this list can be NULL to indicate that no score improvement has been achieved at the corresponding iteration. The example below shows how to filter these out.

Examples

1
2
3
lstPlots <- PlotRCPHistory(
  fitBMWithShiftsToMammalData, layout = "fan")
cowplot::plot_grid(plotlist = lstPlots[!sapply(lstPlots, is.null)])

venelin/PCMView documentation built on Nov. 5, 2019, 12:01 p.m.