stages_em: Structural EM for stages structure

View source: R/stages_em.R

stages_emR Documentation

Structural EM for stages structure

Description

Structural EM for stages structure

Usage

stages_em(
  object,
  data = object$data_raw,
  stages_alg = stages_bhc,
  max_iter_em = 5,
  incremental = FALSE,
  chain_impute = FALSE,
  ...
)

Arguments

object

an object of class sevt with fitted probabilities and data, as returned by full or sevt_fit.

data

the data with missing values to be used in the EM algorithm.

stages_alg

a function that performs stages structure estimation. Similar to stages_bhc or stages_hclust. The function alg must accept the argument scope.

max_iter_em

the maximum number of iterations of the EM algorithm.

incremental

logical. If TRUE, at each iteration of the EM algorithm alg_em is initialized on the results of the previous step. If FALSE, at each iteration alg_em is initialized on the initial argument object.

chain_impute

logical. If TRUE chain predictions (using the order of the variables in object) are used to impute missing values. Otherwise, independent predictions for each missing values are used.

...

additional arguments passed to alg.

Value

The final staged event tree obtained.


gherardovarando/stagedtrees documentation built on July 5, 2025, 12:35 a.m.