Build fitted staged event tree from data.
full(
data,
order = NULL,
join_unobserved = TRUE,
lambda = 0,
name_unobserved = "UNOBSERVED"
)# S3 method for table
full(
data,
order = names(dimnames(data)),
join_unobserved = TRUE,
lambda = 0,
name_unobserved = "UNOBSERVED"
)
# S3 method for 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 table
indep(
data,
order = names(dimnames(data)),
join_unobserved = TRUE,
lambda = 0,
name_unobserved = "UNOBSERVED"
)
# S3 method for data.frame
indep(
data,
order = colnames(data),
join_unobserved = TRUE,
lambda = 0,
name_unobserved = "UNOBSERVED"
)
data to create the model, data.frame or table.
character vector, order of variables.
logical, if situations with zero observations should be joined (default TRUE).
smoothing coefficient (default 0).
name to pass to join_unobserved
.
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.
# NOT RUN {
## 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
# }
Run the code above in your browser using DataLab