define_dist: Define a multivariate beta (mbeta) distribution

View source: R/define_dist.R

define_distR Documentation

Define a multivariate beta (mbeta) distribution

Description

Define a multivariate beta (mbeta) distribution

Usage

define_dist(
  nu = 1,
  mean = 1/2,
  corr = 0,
  moments = NULL,
  gamma = NULL,
  vars = length(mean),
  varnames = NULL,
  groups = 1,
  groupnames = NULL,
  mode = c("auto", "full", "reduced"),
  tol = 0.01,
  project = TRUE,
  msg = TRUE
)

Arguments

nu

integer, 'pseudo-prior-observations'

mean

numeric of length vars, specifying the marginal means. Repeated if of length one.

corr

matrix, symetric, positive definite correlation matrix. If a single correlation

moments

matrix, symmetric matrix with mixed 2nd order moments of the target distribution. See details.

gamma

numeric vector, parameter of the underlying Dirichlet distribution. the base 2 logarithm of length(gamma) needs to be an integer and is the dimension of the resulting multivariate Beta distribution.

vars

integer, number of variables

varnames

character, variables names, needs to have length vars

groups

integer, number of groups (subpopulations) (default: 1)

groupnames

character, group names

mode

character, either "auto" (default), "full" or "reduced". See details.

tol

numeric, maximum relative deviation (default: 0.01) between specified and achieved moment matrix (or correlation matrix)

project

logical, project parameters to satisfy Frechet bounds (TRUE, default) or not (FALSE)

msg

logical, return messages (TRUE, default) or not (FALSE)

Details

Mode "full" implies that the full parameter vector gamma is used which results in nonzero mixed moments. In mode "reduced", a sparse representation with 1+m+(m-1)*m/2 parameters is used to model (prior) sample size, mean and covariance / correlation matrix. Per default (mode="auto"), the mode is set to "full" for dimension <= 10 and "reduced" for dimensions >10.

Value

A SIMPle.dist object representing the multivariate Beta distribution with given parameters.

Examples

define_dist(vars = 3, nu=10, mean=c(0.9,0.8,0.7), corr=0.5)

maxwestphal/SIMPle documentation built on April 11, 2024, 4:07 p.m.