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.


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