View source: R/policy_data_functions.R
get_history_names | R Documentation |
get_history_names()
returns the state covariate names of the history data
table for a given stage. The function is useful when specifying
the design matrix for g_model and q_model objects.
get_history_names(object, stage)
object |
Policy data object created by |
stage |
Stage number. If NULL, the state/Markov-type history variable names are returned. |
Character vector.
library("polle")
### Multiple stages:
d3 <- sim_multi_stage(5e2, seed = 1)
pd3 <- policy_data(data = d3$stage_data,
baseline_data = d3$baseline_data,
type = "long",
id = "id",
stage = "stage",
event = "event",
action = "A",
utility = "U")
pd3
# state/Markov type history variable names (H):
get_history_names(pd3)
# full history variable names (H_k) at stage 2:
get_history_names(pd3, stage = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.