causalsens {causalsens}R Documentation

Calculate sensitivity of causal estimates to unmeasured confounding.

Description

This function performs a sensitivity analysis of causal effects different assumptions about unmeasured confounding, as described by Blackwell (2013).

Usage

  causalsens(model.y, model.t, cov.form,
    confound = one.sided, data, alpha)

Arguments

model.y

outcome model object. Currently only handles lm objects.

model.t

propensity score model. Currently assumes a glm object.

cov.form

one-sided formula to describe any covariates to be included in the parital R^2 calculations.

confound

function that calculates the confounding function. This function must take arguments alpha, pscores, and treat. Defaults to one.sided. Other functions included with the package are one.sided.att, alignment, and alignment.att.

data

data frame to find the covariates from cov.form.

alpha

vector of confounding values to pass the confounding function. Defaults to 11 points from -0.5 to 0.5 for binary outcome variable, and 11 points covering the inter-quartile range for non-binary outcome variables.

Value

Returns an object of class causalsens.


[Package causalsens version 0.1.2 Index]