fit_lcm_tree: Fit latent class model with tree-structured shrinkage over...

View source: R/fit.R

fit_lcm_treeR Documentation

Fit latent class model with tree-structured shrinkage over the observations (this function largely follows Thomas, E.'s well-written package moretrees)

Description

Fit latent class model with tree-structured shrinkage over the observations (this function largely follows Thomas, E.'s well-written package moretrees)

Usage

fit_lcm_tree(
  dsgn,
  vi_params_init,
  hyperparams_init,
  random_init,
  random_init_vals,
  tol,
  tol_hyper,
  max_iter,
  print_freq,
  quiet,
  plot_fig,
  shared_tau,
  update_hyper_freq,
  hyper_fixed
)

Arguments

dsgn

a list of data organized according to the tree (see design_tree())

vi_params_init, hyperparams_init, random_init, random_init_vals, tol, tol_hyper, max_iter, print_freq, quiet, plot_fig, shared_tau, update_hyper_freq, hyper_fixed

initial values and updating protocols. Explained more in the wrapper function lcm_tree()

Value

a list with model updates. Because the variational posterior is comprised of familiar distributional forms that can be determined by the moments, the returned values are these moments:

vi_params

named list of final variational parameter estimates

hyperparams

named list of final hyperparameter estimates

hyper_fixed

named list of fixed hyperparameters

ELBO_track

numeric vector containing the values of the objective function (ELBO) at the end of every iteration


zhenkewu/lotR documentation built on April 24, 2022, 2:36 a.m.