construct_gamma: Construct the gamma parameter for the multivariate Beta...

View source: R/construct_gamma.R

construct_gammaR Documentation

Construct the gamma parameter for the multivariate Beta (mbeta) distribution.

Description

Construct the gamma parameter for the multivariate Beta (mbeta) distribution.

Usage

construct_gamma(
  vars,
  nu = 1,
  moments = nu * (matrix(1/4, vars, vars) + diag(rep(1/4, vars))),
  corr = NULL,
  tol = 0.01,
  input = "moments",
  ...
)

Arguments

vars

integer, dimension of multivariate beta distribution.

nu

numeric, equal to the sum of resulting gamma vector (prior observations).

moments

matrix, .... The entry (j,k) of cp specifies the expected joint probability P(B_j = B_k = 1). See details.

corr

matrix, correlation matrix, only needs to be supplied if input="corr" (default: NULL)

tol

numeric, if obtained momemnt matrix deviates more than tol from the target

input

character, either "moments" (default) or "corr"

...

a warning is given. See details.

Value

A numeric vector gamma of length 2^dims suitable as a parameter for the multivariate Beta (mbeta) distribution.

Examples

construct_gamma(3, 1)


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