gridsens: Find parameter values that min/maximize sensitivity results...

Description Usage Arguments Value

Description

Within specified values of sensitivity parameters, find the ones that achieve minimum/maximum sensitivity results

Usage

1
2
3
4
gridsens(pol, qs = c(0, 0.4, 0.5, 0.6, 1), dps = c(0, log(2)), d0s = c(0,
  log(2)), d1s = c(0, log(2)), params_grid = NULL, base_group = NULL,
  minority_groups = NULL, allow_sgv = FALSE, controls = NULL,
  fit_fn = "logit_coef", include_benchmark = FALSE, verbose = TRUE)

Arguments

pol

object of class policy

qs

vector q values to search

dps

values to search for change in log-odds of treat = 1 if u = 1

d0s

values to search for change in log-odds of response = 1 if treat = 0 and u = 1

d1s

values to search for change in log-odds of response = 1 if treat = 1 and u = 1

params_grid

(Optional) data frame with columns qb, qm, ab, am, d0b, d0m, d1b, d1m indicating the parameter combinations to be searched over. If specified, the parameter range argments (qs through d1s) are ignored.

base_group

(Optional) single group that acts as the pivot/base; by default, if the grouping variable is a factor, set to the first level, otherwise set to the first of sorted unique values

minority_groups

(Optional) groups to compare to the base group; by default, set to every unique value other than the base group

allow_sgv

logical; whether to allow for subgroup validity; i.e., if TRUE, the delta parameters (dp, d0, d1) will be allowed to vary between base/minority groups, but if FALSE, a single value for each delta parameter will be used for each base/minority pair

controls

vector of legitimate controls to use; the ones specified within the policy object will be used if not specified

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)

include_benchmark

logical; whether to include the two extreme benchmark test results (default: FALSE)

verbose

whether or not to print debug messages (0 = none, 1 = results only, 2 = everything)

Value

a list-type object of class gridsens with the following elements

results

tidy dataframe of second-stage model coefficients after searching for min/max values across specified sensitivy parameter values, independently for each minority group

grid

results from full grid

base_case

result from compute_rad on base policy with specified groups and controls

base_group

base group used in analysis


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