initialize_tree_lcm | R Documentation |
Initialize the variational inferential algorithm for latent class model with tree structured shrinkage
initialize_tree_lcm( Y, A, Z_obs, leaf_ids_units, leaf_ids_nodes, ancestors, h_pau, levels, vi_params, hyperparams, hyper_fixed, random_init, random_init_vals, subject_id_list, v_units, shared_tau )
Y |
matrix of binary observations for LCM - rows ordered by leaves in the tree |
A |
a p by p binary matrix: each row is the ancestors including the node itself; ordered by leaves in the tree |
Z_obs |
a two-column matrix of integers, first column is subject ids, second column is a mix of NA and integers, NA means unknown class indicators, an integer indicates the known class. |
leaf_ids_units |
The subject ids in each leaf node (a list) |
leaf_ids_nodes |
the leaf descendants for each internal or leaf nodes (a list) |
ancestors |
a numeric vector of ancestor nodes for each leaf node (a list of length equal to the number of leaves) |
h_pau |
a numeric vector (length = # nodes); the edge length between a node and its parent node. The root node has no parent, because we suggest a separate prior variance for the root node's gamma and alpha, we set the "edge-length" toward root node as 1. |
levels |
a numeric vector of integers from 1 to L, indicating for each node
(leaf or internal node) which set of hyperparameters to use. For example,
if we want the root node to have a separate |
vi_params |
the list of variational parameters. |
hyperparams |
the list of hyperparameters, |
hyper_fixed |
a list of fixed hyperparameters, such as those
in the Beta priors for |
random_init |
logical; |
random_init_vals |
NB: fill out specific elements |
subject_id_list, v_units, shared_tau |
see |
a list vi_params,hyperparams
containing the initial values.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.