get_q_functions {polle} | R Documentation |
Get Q-functions
Description
get_q_functions()
returns a list of (fitted) Q-functions
associated with each stage.
Usage
get_q_functions(object)
Arguments
object |
Object of class policy_eval or policy_object. |
Value
List of class nuisance_functions.
See Also
Examples
### Two stages:
d <- sim_two_stage(5e2, seed=1)
pd <- policy_data(d,
action = c("A_1", "A_2"),
baseline = c("B"),
covariates = list(L = c("L_1", "L_2"),
C = c("C_1", "C_2")),
utility = c("U_1", "U_2", "U_3"))
pd
# evaluating the static policy a=1 using outcome regression
# based on a GLM model at each stage.
pe <- policy_eval(type = "or",
policy_data = pd,
policy = policy_def(1, reuse = TRUE, name = "A=1"),
q_models = list(q_glm(), q_glm()))
pe
# getting the Q-functions
q_functions <- get_q_functions(pe)
# getting the fitted g-function values
head(predict(q_functions, pd))
[Package polle version 1.4 Index]