full_indep | R Documentation |
Build fitted staged event tree from data.
full( data, order = NULL, join_unobserved = TRUE, lambda = 0, name_unobserved = "UNOBSERVED" ) ## S3 method for class 'table' full( data, order = names(dimnames(data)), join_unobserved = TRUE, lambda = 0, name_unobserved = "UNOBSERVED" ) ## S3 method for class 'data.frame' full( data, order = colnames(data), join_unobserved = TRUE, lambda = 0, name_unobserved = "UNOBSERVED" ) indep( data, order = NULL, join_unobserved = TRUE, lambda = 0, name_unobserved = "UNOBSERVED" ) ## S3 method for class 'table' indep( data, order = names(dimnames(data)), join_unobserved = TRUE, lambda = 0, name_unobserved = "UNOBSERVED" ) ## S3 method for class 'data.frame' indep( data, order = colnames(data), join_unobserved = TRUE, lambda = 0, name_unobserved = "UNOBSERVED" )
data |
data to create the model, data.frame or table. |
order |
character vector, order of variables. |
join_unobserved |
logical, if situations with zero observations should be joined (default TRUE). |
lambda |
smoothing coefficient (default 0). |
name_unobserved |
name to pass to |
Functions to create full or independent staged tree models from
data.
The full (or saturated) staged tree is the model where every
situation is in a different stage, and thus the model has the
maximum number of parameters.
Conversely, the independent staged tree (indep
) assigns
all the situations related to the same variable to the same
stage, thus it is equivalent to the independence factorization.
## full model DD <- generate_xor_dataset(4, 100) model_full <- full(DD, lambda = 1) ## independence model (data.frame) DD <- generate_xor_dataset(4, 100) model <- indep(DD, lambda = 1) model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.