MCMCglmm.subsets {dispRity}R Documentation

MCMCglmm.subsets

Description

Creating a dispRity object from a MCMCglmm posterior output

Usage

MCMCglmm.subsets(
  data,
  posteriors,
  group,
  tree,
  rename.groups,
  set.loc = TRUE,
  ...
)

Arguments

data

The data.frame or matrix used for the MCMCglmm model.

posteriors

A MCMCglmm object, the posteriors of the model.

group

Optional, a named vector of which group to include from the posteriors (if left empty the random and residual terms are used). See details.

tree

Optional, the tree(s) used in the MCMCglmm analyses.

rename.groups

Optional, a vector of group names for renaming them. See details.

set.loc

Optional, if no location is available for a subset ($Sol = 0), set the location of the subset from data (the centroid of the group) (default is TRUE).

...

Optional arguments to be passed to MCMCglmm.covars.

Details

NOTE that the output dispRity inherits the dimensions used in the posteriors argument. You can always check the selected dimensions using: data$call$dimensions

Author(s)

Thomas Guillerme

See Also

dispRity covar.plot

Examples

data(charadriiformes)

## Creating a dispRity object from the charadriiformes model
MCMCglmm.subsets(data       = charadriiformes$data,
                 posteriors = charadriiformes$posteriors)

## Same but selecting only the three first random terms
MCMCglmm.subsets(data       = charadriiformes$data,
                 posteriors = charadriiformes$posteriors,
                 tree       = charadriiformes$tree,
                 group      = MCMCglmm.levels(
                                 charadriiformes$posteriors)[1:3],
                 rename.groups = c("gulls", "plovers", "sandpipers"))



[Package dispRity version 1.8 Index]