rlassologitEffects: rigorous Lasso for Logistic Models: Inference

Description Usage Arguments Details Value References Examples

View source: R/rlassologitEffect.R

Description

The function estimates (low-dimensional) target coefficients in a high-dimensional logistic model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rlassologitEffects(x, ...)

## Default S3 method:
rlassologitEffects(x, y, index = c(1:ncol(x)), I3 = NULL,
  post = TRUE, ...)

## S3 method for class 'formula'
rlassologitEffects(formula, data, I, included = NULL,
  post = TRUE, ...)

rlassologitEffect(x, y, d, I3 = NULL, post = TRUE)

Arguments

x

matrix of regressor variables serving as controls and potential treatments. For rlassologitEffect it contains only controls, for rlassologitEffects both controls and potential treatments. For rlassologitEffects it must have at least two columns.

...

additional parameters

y

outcome variable

index

vector of integers, logical or names indicating the position (column) or name of variables of x which should be used as treatment variables.

I3

logical vector with same length as the number of controls; indicates if variables (TRUE) should be included in any case.

post

logical. If TRUE, post-Lasso estimation is conducted.

formula

An element of class formula specifying the linear model.

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which the function is called.

I

An one-sided formula specifying the variables for which inference is conducted.

included

One-sided formula of variables which should be included in any case.

d

variable for which inference is conducted (treatment variable)

Details

The functions estimates (low-dimensional) target coefficients in a high-dimensional logistic model. An application is e.g. estimation of a treatment effect α_0 in a setting of high-dimensional controls. The function is a wrap function for rlassologitEffect which does inference for only one variable (d).

Value

The function returns an object of class rlassologitEffects with the following entries:

coefficients

estimated value of the coefficients

se

standard errors

t

t-statistics

pval

p-values

samplesize

sample size of the data set

I

index of variables of the union of the lasso regressions

References

A. Belloni, V. Chernozhukov, Y. Wei (2013). Honest confidence regions for a regression parameter in logistic regression with a loarge number of controls. cemmap working paper CWP67/13.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
library(hdm)
## DGP
set.seed(2)
n <- 250
p <- 100
px <- 10
X <- matrix(rnorm(n*p), ncol=p)
colnames(X) = paste("V", 1:p, sep="")
beta <- c(rep(2,px), rep(0,p-px))
intercept <- 1
P <- exp(intercept + X %*% beta)/(1+exp(intercept + X %*% beta))
y <- rbinom(length(y), size=1, prob=P)
xd <- X[,2:50]
d <- X[,1]
logit.effect <- rlassologitEffect(x=xd, d=d, y=y)
logit.effects <- rlassologitEffects(X,y, index=c(1,2,40))
logit.effects.f <- rlassologitEffects(y ~ X, I = ~ V1 + V2)

## End(Not run)

hdm documentation built on May 12, 2018, 3:01 a.m.