RprobitB_model: Create object of class 'RprobitB_model'.

Description Usage Arguments Value

View source: R/RprobitB_model.R

Description

This function creates an object of class RprobitB_model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
RprobitB_model(
  data,
  normalization,
  R,
  B,
  Q,
  latent_classes,
  prior,
  gibbs_samples,
  classification
)

Arguments

data

An object of class RprobitB_data.

normalization

An object of class RprobitB_normalization.

R

The number of iterations of the Gibbs sampler.

B

The length of the burn-in period, i.e. a non-negative number of samples to be discarded.

Q

The thinning factor for the Gibbs samples, i.e. only every Qth sample is kept.

latent_classes

Either NULL or a list of parameters specifying the number and the latent classes:

  • C: The number (greater or equal 1) of latent classes, which is set to 1 per default and is ignored if P_r = 0. If update = TRUE, C equals the initial number of classes.

  • update: A boolean, determining whether to update C. Ignored if P_r = 0. If update = FALSE, all of the following elements are ignored.

  • Cmax: The maximum number of latent classes.

  • buffer: The updating buffer (number of iterations to wait before the next update).

  • epsmin: The threshold weight for removing latent classes (between 0 and 1).

  • epsmax: The threshold weight for splitting latent classes (between 0 and 1).

  • distmin: The threshold difference in means for joining latent classes (non-negative).

prior

A named list of parameters for the prior distributions of the normalized parameters:

  • eta: The mean vector of length P_f of the normal prior for alpha.

  • Psi: The covariance matrix of dimension P_f x P_f of the normal prior for alpha.

  • delta: The concentration parameter of length 1 of the Dirichlet prior for s.

  • xi: The mean vector of length P_r of the normal prior for each b_c.

  • D: The covariance matrix of dimension P_r x P_r of the normal prior for each b_c.

  • nu: The degrees of freedom (a natural number greater than P_r) of the Inverse Wishart prior for each Omega_c.

  • Theta: The scale matrix of dimension P_r x P_r of the Inverse Wishart prior for each Omega_c.

  • kappa: The degrees of freedom (a natural number greater than J-1) of the Inverse Wishart prior for Sigma.

  • E: The scale matrix of dimension J-1 x J-1 of the Inverse Wishart prior for Sigma.

gibbs_samples

An object of class RprobitB_gibbs_samples.

classification

The allocation variable of the estimated latent classes.

Value

An object of class RprobitB_model, i.e. a list with the arguments of this function as elements.


RprobitB documentation built on Nov. 12, 2021, 5:08 p.m.