causalNullTest.control: Initialize control parameters for causalNullTest

View source: R/causal.null.test.R

causalNullTest.controlR Documentation

Initialize control parameters for causalNullTest

Description

This function initializes the control parameters for use in causalNullTest. The outcome regression function mu is by default estimated using SuperLearner, and the propensity is estimated using the conditional mixed density method implemented in cmdSuperLearner. Alternatively, the estimation process can be overriden by providing predictions from pre-fit nuisance estimators.

Usage

causalNullTest.control(
  mu.SL.library = c("SL.mean", "SL.glm", "SL.gam", "SL.earth"),
  g.SL.library = c("SL.mean", "SL.glm", "SL.gam", "SL.earth"),
  g.n.bins = 2:(length(unique(A))/50),
  cross.fit = TRUE,
  V = 10,
  folds = NULL,
  save.nuis.fits = FALSE,
  mu.hat = NULL,
  g.hat = NULL,
  n.sim = 10000,
  return.Omega = FALSE,
  conf.level = 0.95,
  verbose = FALSE
)

Arguments

mu.SL.library

Library of candidate learners for the outcome regression to be passed on to SuperLearner. Ignored if mu.hats is provided.

g.SL.library

Library of candidate learners for the outcome regression to be passed on to cmdSuperLearner.

g.n.bins

Numeric vector of number of bins to use for estimation of the propensity. Passed on to cmdSuperLearner.

cross.fit

Logical indicating whether to cross-fit nuisance parameters. Defaults to TRUE.

V

Positive integer number of folds for cross-fitting. Defaults to 10.

folds

Optional n x 1 numeric vector indicating which fold each observation is in.

save.nuis.fits

Logical indicating whether to save the fitted nuisance objects.

mu.hat

Optional pre-fit outcome regression. If cross.fit is FALSE, then a function that takes arguments a (a vector) and w (a data.frame) and returns predictions of the outcome regression function. If cross.fit is TRUE, then a list of functions of length V with the fitted outcome regression functions on each of the V training sets. If provided as a list of functions, then folds must be provided. If mu.SL.library = NULL, then mu.hats must be specified.

g.hat

Optional pre-fit treatment propensities. If cross.fit is FALSE, then a function that takes arguments a (a vector) and w (a data.frame) and returns predictions of the standardized propensity function. If cross.fit is TRUE, then a list of functions of length V with the fitted standardized propensity functions on each of the V training sets. If provided as a list of functions, then folds must be provided. If g.SL.library = NULL, then g.hats must be specified.

n.sim

Number of simulations to use for the limiting Gaussian process in computing approximate quantiles.

return.Omega

Logical indicating whether to return the estimated primitive function Omega.

conf.level

Optional confidence level to use for computing confidence bands for Omega.

verbose

Logical indicating whether to print progress to the command line.

Value

Named list containing the control options.


tedwestling/ctsCausal documentation built on Dec. 7, 2022, 3:33 p.m.