rad_control: Given a policy and (optional) controls, generate a...

Description Usage Arguments Details Value

Description

Given a policy and (optional) controls, generate a rad_control object

Usage

1
2
rad_control(pol, fit_fn = c("logit_coef", "gam_coef", "decbin_coef",
  "logit_avg", "gam_avg"), controls = NULL, use_speedglm = TRUE)

Arguments

pol

a policy object

fit_fn

string indicating the rad estimation model/procedure used. *_coef methods use models without interaction between risk and group, and return the coeficient on group membership. *_avg methods will fit more flexible models (possibly with interactions), and compute average ratios across the population. (TODO: better documentation is expected)

controls

character vector of additional controls to consider in the second-stage model

use_speedglm

whether or not to use speedglm, instead of stats::glm, in cases where N > 2P (see details)

Details

speedglm can potentially speed-up computation significantly, but only in cases where the number of rows is somewhat greater than the number of features (specifically, when N > 2P). In terms of FLOPs at each Fisher iteration, stats::glm requires (2np^2 - (2/3)p^3) FLOPS vs, (np^2 + (4/3)p^3) for speedglm.

Value

a rad_control object constructed of

formula

the formula used in model fitting

label

a character label associated with the model fit type

grouping

column name of group, as specified in pol$grouping

fit

a function of the form f(d, w = NULL, ...) for fitting a model with training data d

pred

function of the form g(m, d) for generating predictions for data d with model m

method

character string describing the method to use


jongbinjung/undi documentation built on May 8, 2019, 11:56 p.m.