partial {polle} | R Documentation |
Trim Number of Stages
Description
partial
creates a partial policy data object by trimming
the maximum number of stages in the policy data object to a fixed
given number.
Usage
partial(object, K)
Arguments
object |
Object of class policy_data. |
K |
Maximum number of stages. |
Value
Object of class policy_data.
Examples
library("polle")
### Multiple stage case
d <- sim_multi_stage(5e2, seed = 1)
# constructing policy_data object:
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
# Creating a partial policy data object with 3 stages
pd3 <- partial(pd, K = 3)
pd3
[Package polle version 1.4 Index]