fit_nlcm_doubletree: Fit nested latent class model with double-tree-structured...

View source: R/fit.R

fit_nlcm_doubletreeR Documentation

Fit nested latent class model with double-tree-structured shrinkage over
  1. domains and 2) causes

Description

Fit nested latent class model with double-tree-structured shrinkage over

  1. domains and 2) causes

Usage

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

Arguments

dsgn

a list; data organized according to the trees (see design_doubletree())

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

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

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/doubletree documentation built on Oct. 21, 2023, 7:04 a.m.