split_stage_random: Split randomly a stage

View source: R/stage_operations.R

split_stage_randomR Documentation

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.

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.

Value

an object of class sevt.


stagedtrees documentation built on May 29, 2024, 12:33 p.m.