sevt_fit_em: Fit a staged event tree with the hard...

View source: R/sevt_fit_em.R

sevt_fit_emR Documentation

Fit a staged event tree with the hard Expectation-Maximization (EM) algorithm

Description

Estimate transition probabilities in a staged event tree from data containing missing data using the hard (imputed) Expectation-Maximization algorithm.

Usage

sevt_fit_em(
  object,
  data = object$data_raw,
  lambda = NULL,
  scope = NULL,
  max_iter = 5,
  chain_impute = FALSE
)

Arguments

object

an object of class sevt.

data

data.frame with observations of the variables in object.

lambda

smoothing parameter. Default (NULL) to lambda value stored in object. If no lambda value is stored nor provided, 0 will be used with a warning.

scope

which variable should be fitted. The value will be passed to sevt_fit.

max_iter

positive integer, the maximum number of iteration to be used in the EM algorithm.

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.

Value

A fitted staged event tree, See the return field of sevt_fit.


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