initialize_nlcm_doubletree | R Documentation |
NB: 1) does this work with missing CODs in all domains (not just the target domain); 2) does this work with partially-known labels in the target domain (not all are missing) Organize intermediate variables,
target_id.
who are in the target domain
who are the people from cause c and domain g
check the mapping from integers to leaves; same for all the nodes
initialize_nlcm_doubletree(
Y,
A,
leaf_ids_units,
leaf_ids,
leaf_ids_nodes,
ancestors,
v_units,
h_pau,
levels,
vi_params,
hyperparams,
hyper_fixed,
random_init,
random_init_vals
)
Y |
matrix of binary observations; preprocessed data from
|
A |
a list of two square binary matrices: the first is |
leaf_ids_units |
unit ids nested in each leaf node; a list of two elements (for tree1 and tree2); each element is again a list - each of its element is associated with a leaf in a tree and contains the subject ids in that leaf node. |
leaf_ids |
a list of length two; each element is a vector of character strings indicating the leaf label an observation is coming from. For the first element, there might be missing values, including unobserved leaf label in tree1. |
leaf_ids_nodes |
leaf descendants; a list of two elements (for tree1 and tree2); for each element, the leaf descendants for each internal or leaf nodes (a list) |
ancestors |
a list of two elements (for tree1 and tree2); Each element is a list, with each element containing numeric vector of ancestor nodes - the length is equal to the number of leaves in a tree. |
v_units |
a list of two elements (for tree1 and tree2) - both are of length |
h_pau |
edge weights; a list of two elements (for tree1 and tree2);
a numeric vector (length = #nodes) the edge length between a node and its parent node.
The root node has no parent, we set the edge length toward root node to |
levels |
a list of two elements (for tree1 and tree2);
For each element, a numeric vector of integers from |
vi_params |
the list of variational parameters. |
hyperparams |
the list of hyperparameters |
hyper_fixed |
a list of fixed hyperparameters: the number of classes |
random_init |
logical; |
random_init_vals |
NB: fill out specific elements; this is to be done. |
a list of two elements:vi_params
,hyperparams
with initial values for the
nested latent class model with double tree shrinkage. target_id
and scenario
are
both added (use ?doubletree
to see meanings of scenarios).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.