bootstrapProc: Bootstrap procedure after the mean estimates are given

Description Usage Arguments Value

View source: R/procFunctions.R

Description

This function runs bootstrap procedure and returns the confidence intervals for the mean estimates and the uniform confidence bands for the quantile differences. It also produces quantile difference plots.

Usage

1
2
3
4
5
6
7
bootstrapProc(df, dDim, meanReporting, treatment, posttreat,
  typeSieve = "spline", formula, numOrder, numKnots,
  dumAllAdditive = FALSE, additiveSpline = FALSE, nGrids = 30,
  nGridsFine = 1000, plotBeg = 0.25, plotEnd = 0.75, plotBy = 0.05,
  link = "logit", optMute = TRUE, clusterInference, cluster = "",
  nBoot = 301, alpha = 0.05, Ytype = "Yb", discY = FALSE,
  showDisplayMean = TRUE, saveFile = TRUE)

Arguments

df

a data.frame, the exact dataset used for the study.

dDim

an integer, positive, the number of values D would take.

meanReporting

a list, reporting list produced from the meanEstimate function.

treatment

a string, variable name for the treatment variable.

posttreat

a string, variable name for the post-treatment variable.

typeSieve

a string, either "polynomial" or "spline". Default is "spline" taking B-spline for the continuous variables specified in formula

formula

a formula object, for "spline", specify as "outcome ~ continuous | discrete". For "polynomial", use as in other packages like "lm". See the examples for detailed uses.

numOrder

(for typeSieve = "spline") an integer, positive, the maximum order of the spline polynomial. It must be the same as previously used for meanEstimate.

numKnots

(for typeSieve = "spline") an integer, positive, the number of knots for the spline. It must be the same as previously used for meanEstimate.

dumAllAdditive

(for typeSieve = "spline") a boolean, if TRUE, then the dummies are additively included. Default is FALSE and splines are allowed different across discrete variables term.

additiveSpline

(for typeSieve = "spline") a boolean, if TRUE, then the splines are additively combined. Default is FALSE and uses the kronecker product of uni-dimensional splines.

nGrids

an integer, positive, a number of grids for the outcome in the estimation for the conditional cdfs. Default is set to 30. This number crucially affects the computation time as it requires this many of glm estimations separately.

nGridsFine

an integer, positive, a number of grids used for the numerical integration. Default is set to 1000.

plotBeg

a float, a value in (0,1), the lower range of the quantile difference estimate.

plotEnd

a float, a value in (0,1), the upper range of the quantile difference estimate.

plotBy

a float, a positive value, the increment for the quantile difference esimate.

link

a string, a link function used as a binomial family link for glm. Refer to the specification of the link options for the R package glm. Defalt is "logit"

optMute

a boolean, option to toggle off the outputs used during the development. Default is TRUE.

clusterInference,

a boolean, if TRUE then cluster resampling is used instead of individual resampling

cluster

a string, variable name representing the cluster. Default is "".

nBoot

an integer, positive, a number of bootstrap iterations for the confidence interval construction, plus the true mean estimate. Default is 301.

alpha

a float, a value in (0,1), the size of the test. The default is 0.05.

Ytype

a string, either "Yb" or "Y1". Default is "Yb" which uses a proxy variable for Y0. Specification with "Y1" uses Y1 as a proxy for Y0.

discY

a boolean, option to toggle on an experimental feature for the partial identification with discrete proxy variable. Default is FALSE, which assumes absolutely continuous Yb.

showDisplayMean,

a boolean, if TRUE, then it shows a table of CIs intermediary before the whole bootstrap ends. Default is TRUE.

saveFile,

a boolean, if TRUE, it returns the eps files of plots. Default is TRUE.

Value

returns the vector of CIs. The first element is the length of mean effect CIs and the mean CIs, then followed by the length of quantile CIs and the quantile CIs.


SMasa11/ptse documentation built on Sept. 11, 2019, 12:48 a.m.