Learn R Programming

polle (version 1.6.2)

get_K: Get Maximal Stages

Description

get_K returns the maximal number of stages for the observations in the policy data object.

Usage

get_K(object)

Value

Integer.

Arguments

object

Object of class policy_data.

Examples

Run this code
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