ipsi: Estimating effects of incremental propensity score...

Description Usage Arguments Value Details References Examples

View source: R/ipsi.R

Description

ipsi is used to estimate effects of incremental propensity score interventions, i.e., estimates of mean outcomes if the odds of receiving treatment were multiplied by a factor delta.

Usage

1
ipsi(dat, x.trt, x.out, delta.seq, nsplits)

Arguments

y

outcome of interest measured at end of study.

a

binary treatment.

x.trt

covariate matrix for treatment regression.

x.out

covariate matrix for outcome regression.

time

measurement time.

id

subject identifier.

delta.seq

sequence of delta increment values.

nsplits

integer number of sample splits for nuisance estimation. If nsplits=1, sample splitting is not used, and nuisance functions are estimated on full sample (in which case validity of SEs/CIs requires empirical process conditions). Otherwise must have nsplits>1.

Value

A list containing the following components:

res

estimates/SEs and uniform CIs for population means.

res.ptwise

estimates/SEs and pointwise CIs for population means.

calpha

multiplier bootstrap critical value.

Details

Treatment and covariates are expected to be time-varying and measured throughout the course of the study. Therefore if n is the number of subjects and T the number of timepoints, then a, time, and id should all be vectors of length nxT, and x.trt and x.out should be matrices with nxT rows. However y should be a vector of length n since it is only measured at the end of the study. The subject ordering should be consistent across function inputs, based on the ordering specified by id. See example below for an illustration.

References

Kennedy EH. Nonparametric causal effects based on incremental propensity score interventions. arxiv:1704.00211

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
n <- 500; T <- 4

time <- rep(1:T,n); id <- rep(1:n,rep(T,n))
x.trt <- matrix(rnorm(n*T*5),nrow=n*T)
x.out <- matrix(rnorm(n*T*5),nrow=n*T)
a <- rbinom(n*T,1,.5); y <- rnorm(n)

d.seq <- seq(0.1,5,length.out=10)

ipsi.res <- ipsi(y,a, x.trt,x.out, time,id, d.seq)

ehkennedy/npcausal documentation built on June 20, 2018, 4:24 a.m.