pic_stat_cvar_plot: Plot histogram of contrasts with variance

View source: R/plotting-fxns.R

pic_stat_cvar_plotR Documentation

Plot histogram of contrasts with variance

Description

This is a diagnostic plot for looking at the distribution of contrasts derived from a rescaled 'unit.tree' object.

Usage

pic_stat_cvar_plot(
  x,
  xlab = "Contrasts",
  ylab = "Counts",
  col = NA,
  breaks = NA,
  las = 1,
  lwd = 2,
  ...
)

Arguments

x

a unit.tree object (see make_unit_tree).

xlab

x-axis label. Defaults to "Contrasts".

ylab

y-axis label. Defaults to "Counts".

col

plot colours. The first colour is used for the histogram, the second designates the mean. If no argument supplied, uses default colours.

breaks

number of breaks for histogram. Defaults to the number of contrats/10.

las

plot parameter (see par). Defaults to 1.

lwd

plot parameter (see par). Defaults to 2.

...

aditional arguments to be passed to plot.

Details

This function is just intended to be a quick diagnostic for looking at the distribution of contrats. The standard deviation (the arrows in the plot)/mean is equal to the value of pic_stat_cvar. It is a default test statistic in calculate_pic_stat.

If the model is adequate the sd should be close to 1.

This function can currently only take a single unit.tree (does not integrate across unit.trees)

See Also

make_unit_tree, calculate_pic_stat, pic_stat_cvar

Examples

## finch data
data(finch)
phy <- finch$phy
data <- finch$data[,1]

u <- make_unit_tree(phy, data=data)

pic_stat_cvar_plot(u)


mwpennell/arbutus documentation built on Oct. 6, 2022, 10 a.m.