single.shift.range: Single Shift Estimator Across Delta Range

Description Usage Arguments Value

View source: R/singleShiftRangeWrapper.R

Description

Estimates the effects of shifting up across a range of values. Includes the multiplier bootstrap for calculations of uniform confidence bands

Usage

1
2
3
single.shift.range(y, a, z, x, delta, Y.est, A.est, Z.est, nfolds = 2,
  zmax = Inf, zmin = -Inf, alpha = 0.05, nbs = 10000,
  pos.cutoff = 500, ...)

Arguments

y

your outcome variable (a vector)

a

your treatment variable (a vector)

z

your instrument (a vector)

x

a dataframe of covariates

delta

a vector of shift levels

Y.est

an algorithm for estimating the means of your outcome. Should be 'glm', 'superlearner' or 'ranger'. If you choose superlearner, you can also specify the libraries you would like to use. Default libraries are c("SL.glm","SL.randomForest","SL.polymars","SL.mean").

A.est

an algorithm for estimating the means of your treatment. Should be 'glm', 'superlearner' or 'ranger'. If you choose superlearner, you can also specify the libraries you would like to use. Default libraries are c("SL.glm","SL.randomForest","SL.polymars","SL.mean").

Z.est

an algorithm for estimating the means of your treatment. Should be 'glm' in which case a glm is used to estimte the mean and variance and a kernel is used to estimate the density, or 'flexcode'. If you choose 'flexcode', you can specify the regression function. The default is regressionFunction.NW

nfolds

number of folds. Defaults to 2

zmax

the upper bound on Z, default is Inf

zmin

the lower bound on Z, default is -Inf

alpha

the alpha level for your multiplier bootstrap confidence bands (default 0.05)

nbs

the number of boostrap samples to take. Default is 10,000.

pos.cutoff

the level at which you want to truncate pi(Z+delta)/pi(Z) for positivity restrictions. Default is 50.

Value

a list including an estimate of the effect for each delta value and its standard deviation, as well as upper and lower confidence intervals for the pointwise and uniform case.


jackiemauro/ShiftEst documentation built on Feb. 14, 2020, 2:46 a.m.