Learn R Programming

stagedtrees (version 2.1.0)

split_stage_random: Split randomly a stage

Description

Randomly assign some of the paths to a new stage.

Usage

split_stage_random(object, var, stage, p = 0.5)

Arguments

object

an object of class sevt.

var

the variable name.

stage

the name of the stage.

p

probability to move a situation from the original stage into the new stage.

Value

an object of class sevt.

Details

Splits randomly a given stage into two stages. More precisely, it assigns each situation within the given stage into a new stage with probability p.