CATE: Inference for difference of linear combinations of the...

View source: R/CATE.R

CATER Documentation

Inference for difference of linear combinations of the regression vectors in high dimensional generalized linear regressions

Description

Computes the bias-corrected estimator of the difference of linear combinations of the regression vectors for the high dimensional generalized linear regressions and the corresponding standard error.

Usage

CATE(
  X1,
  y1,
  X2,
  y2,
  loading.mat,
  model = c("linear", "logistic", "logistic_alter"),
  intercept = TRUE,
  intercept.loading = FALSE,
  beta.init1 = NULL,
  beta.init2 = NULL,
  lambda = NULL,
  mu = NULL,
  prob.filter = 0.05,
  rescale = 1.1,
  alpha = 0.05,
  verbose = FALSE
)

Arguments

X1

Design matrix for the first sample, of dimension n_1 x p

y1

Outcome vector for the first sample, of length n_1

X2

Design matrix for the second sample, of dimension n_2 x p

y2

Outcome vector for the second sample, of length n_1

loading.mat

Loading matrix, nrow=p, each column corresponds to a loading of interest

model

The high dimensional regression model, either "linear" or "logistic" or "logistic_alter"

intercept

Should intercept(s) be fitted for the initial estimators (default = TRUE)

intercept.loading

Should intercept term be included for the loading (default = FALSE)

beta.init1

The initial estimator of the regression vector for the 1st data (default = NULL)

beta.init2

The initial estimator of the regression vector for the 2nd data (default = NULL)

lambda

The tuning parameter in fitting initial model. If NULL, it will be picked by cross-validation. (default = NULL)

mu

The dual tuning parameter used in the construction of the projection direction. If NULL it will be searched automatically. (default = NULL)

prob.filter

The threshold of estimated probabilities for filtering observations in logistic regression. (default = 0.05)

rescale

The factor to enlarge the standard error to account for the finite sample bias. (default = 1.1)

alpha

Level of significance to construct two-sided confidence interval (default = 0.05)

verbose

Should intermediate message(s) be printed (default = FALSE)

Value

A list consists of plugin estimators, debiased estimators, and confidence intervals. For logistic regression, it also returns those items after probability transformation.

est.plugin.vec

The vector of plugin(biased) estimators for the linear combination of regression coefficients, length of ncol(loading.mat); corresponding to different column in loading.mat

est.debias.vec

The vector of bias-corrected estimators for the linear combination of regression coefficients, length of ncol(loading.mat); corresponding to different column in loading.mat

se.vec

The vector of standard errors of the bias-corrected estimators, length of ncol(loading.mat); corresponding to different column in loading.mat

ci.mat

The matrix of two.sided confidence interval for the linear combination, dimension of ncol(loading.mat) x 2; the row corresponding to different column in loading.mat

prob.debias.vec

The vector of bias-corrected estimators after probability transformation, length of ncol(loading.mat); corresponding to different column in loading.mat.

prob.se.vec

The vector of standard errors of the bias-corrected estimators after probability transformation, length of ncol(loading.mat); corresponding to different column in loading.mat.

prob.ci.mat

The matrix of two.sided confidence interval of the bias-corrected estimators after probability transformation, dimension of ncol(loading.mat) x 2; the row corresponding to different column in loading.mat.

Examples

X1 = matrix(rnorm(100*5), nrow=100, ncol=5)
y1 = -0.5 + X1[,1] * 0.5 + X1[,2] * 1 + rnorm(100)
X2 = matrix(rnorm(90*5), nrow=90, ncol=5)
y2 = -0.4 + X2[,1] * 0.48 + X2[,2] * 1.1 + rnorm(90)
loading1 = c(1, 1, rep(0,3))
loading2 = c(-0.5, -1, rep(0,3))
loading.mat = cbind(loading1, loading2)
Est = CATE(X1, y1, X2, y2, loading.mat, model="linear")

## compute confidence intervals
ci(Est, alpha=0.05, alternative="two.sided")

## summary statistics
summary(Est)

SIHR documentation built on April 9, 2023, 5:08 p.m.

Related to CATE in SIHR...