summary.mulTree: Summarises 'mulTree' data

View source: R/summary.mulTree.R

summary.mulTreeR Documentation

Summarises mulTree data

Description

Summarises the MCMCglmm models calculated from multiple trees by caculating the highest density regions (hdr) of the fixed and random terms.

Usage

## S3 method for class 'mulTree'
summary(
  mulTree.results,
  prob = c(50, 95),
  use.hdr = TRUE,
  cent.tend = stats::median,
  ...
)

Arguments

mulTree.results

A mulTree object obtained from read.mulTree function.

prob

One or more precentage values for to be the credibility intervals (default = c(50, 95)).

use.hdr

Logical, whether to calculate the highest density region using hdr (TRUE) or the quantiles using quantile (FALSE).

cent.tend

A function for calculating the central tendency (default = median) from the quantiles (if use.hdr = FALSE; else is ignored).

...

Any optional arguments to be passed to the hdr or quantile functions.

Details

When using the highest density region caculation method (use.hdr = TRUE), the returned central tendency is always the first estimated mode (see hdr). Note that the results maybe vary when using use.hdr = FALSE or TRUE. We recommend to use use.hdr = TRUE when possible.

When use.hdr = FALSE, the computation is faster but the quantiles are calculated and not estimated.

When use.hdr = TRUE, the computation is slower but the quantiles are estimated using the highest density regions. The given estimates central tendency is calculated as the mode of the estimated highest density region. For speeding up the calculations, the bandwidth (h argument) from hdr can be estimated by using bw.nrd0.

Value

A matrix of class mulTree.

Author(s)

Thomas Guillerme

See Also

mulTree, read.mulTree, plot.mulTree

Examples

## Read in the data
data(lifespan.mcmc)

## Summarizing all the chains
summary(lifespan.mcmc)

## Modyfing the CI
summary(lifespan.mcmc, prob = 95)

## Using use.hdr = FALSE
summary(lifespan.mcmc, use.hdr = FALSE)


TGuillerme/mulTree documentation built on Feb. 21, 2024, 9:18 a.m.