rlassologitEffects {hdm} | R Documentation |
The function estimates (low-dimensional) target coefficients in a high-dimensional logistic model.
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)
x |
matrix of regressor variables serving as controls and potential
treatments. For |
... |
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 |
formula |
An element of class |
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) |
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).
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 |
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.
## 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)