getGroupMeans {TreeBUGS}R Documentation

Get Mean Parameters per Group

Description

For hierarchical latent-trait MPT models with discrete predictor variables as fitted with traitMPT(..., predStructure = list("f")).

Usage

getGroupMeans(
  traitMPT,
  factor = "all",
  probit = FALSE,
  file = NULL,
  mcmc = FALSE
)

Arguments

traitMPT

a fitted traitMPT model

factor

whether to get group estimates for all combinations of factor levels (default) or only for specific factors (requires the names of the covariates in covData)

probit

whether to use probit scale or probability scale

file

filename to export results in .csv format (e.g., file="fit_group.csv")

mcmc

if TRUE, the raw MCMC samples for the group means are returned as an mcmc.list object. This allows pairwise tests of group means (see transformedParameters).

Author(s)

Daniel Heck

See Also

getParam for parameter estimates

Examples

## Not run: 
# save group means (probability scale):
getGroupMeans(traitMPT, file = "groups.csv")

## End(Not run)

[Package TreeBUGS version 1.5.0 Index]