sensitize.policy: Compute the sensitivity-adjusted estimates of predicted...

Description Usage Arguments Details Value

Description

Compute the sensitivity-adjusted estimates of predicted outcome given treatment/control for a policy object

Usage

1
2
3
## S3 method for class 'policy'
sensitize(obj, q, dp, d0, d1, compare = NULL,
  ptreat = NULL, resp_ctl = NULL, resp_trt = NULL, ...)

Arguments

obj

data to sensitize

q

p(u = 1 | x) (see Details)

dp

change in log-odds of treat = 1 if u = 1 (see Details)

d0

change in log-odds of response = 1 if treat = 0 and u = 1 (see Details)

d1

change in log-odds of response = 1 of treat = 1 and u = 1 (see Details)

compare

(Optional) character vector of groups to compare; the data will be filtered such that only specified groups are compared, and the grouping variable will be refactored such that the levels preserve the specified order, e.g., compare = c("white", "black") will make "white" the base group

ptreat

(Optional) default value for probability of treatment; if provided, it will override fitted values in pol$data

resp_ctl

(Optional)

resp_trt

(Optional) default value for probability of response = 1 given each treatment regime (ctl, trt); useful for cases where outcome under certain treatment regimes is deterministic (e.g., probability of finding illegal weapon if NOT frisked is 0); if provided, it will override fitted values in pol$data

...

additional arguments are ignored

Details

All sensitivity parameters (q, dp, d0, d1) can be provided in one of three formats, determined by the length of each argument:

if length(arg) = 1

single value applied to all observations (rows)

if length(arg) = number of levels in grouping variable

each parameter setting applied to corresponding level in group

if length(arg) = nrow(pol$data)

each parameter applied to corresponding rows

Note that if compare is specified, the number of grouping levels is effectively the length of compare

Value

a new sensitive_policy object, which inherits policy, with the data element updated according to sensitivity parameters; all other aspects of the original policy object are preserved.


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