Learn R Programming

freebird (version 1.0)

ptehd: Proportion of treatment effect explained by high-dimensional surrogates

Description

Estimates the proportion of the treatment effect explained by the indirect effect via high-dimensional surrogates.

Usage

ptehd(Yt, Yc, St, Sc, lambda_range = c(0, 1))

Value

A list with components:

est_id

Estimate of indirect effect, defined as \(\int E(Y | S = s, Z = 1) dF(s | Z = 1) - \int E(Y | S = s, Z = 0) dF(s | Z = 0)\)

sd_id

Standard deviation of indirect effect estimate

est_total

Estimate of total effect

sd_total

Standard deviation of total effect estimate

V

Covariance matrix of (est_id, est_total)

est_R

Estimate of proportion of treatment effect explained by surrogates

sd_R

Standard deviation of proportion estimate

lambda_used

lambda used during optimization

Arguments

Yt

The n-dmensional outcome vector in the treatment group.

Yc

The n-dmensional outcome vector in the control group.

St

The n x p matrix of surrogates in the treatment group.

Sc

The n x p matrix of surrogates in the treatment group.

lambda_range

Min and max of range of range of tuning parameter to use during the constrained l1 optimization step.

Author

Ruixuan Zhou

Examples

Run this code
n = 10
St = replicate(n, rnorm(20, mean = 1))
Sc = replicate(n, rnorm(20))
Yt = 1 + rowSums(St) / 2 + rnorm(n)
Yc = rowSums(Sc) / 3 + rnorm(n)
# Requires installation of mosek to run
if (FALSE) {
out = ptehd(Yt, Yc, St, Sc)
}

Run the code above in your browser using DataLab