d <- sim_multi_stage(5e2, seed = 1)
pd <- policy_data(data = d$stage_data,
baseline_data = d$baseline_data,
type = "long",
id = "id",
stage = "stage",
event = "event",
action = "A",
utility = "U")
pd
# getting the maximal number of stages:
get_K(pd)
Run the code above in your browser using DataLab