*! version 1.0.0 23may2021

Title

posw -- Partialling-out estimator based on stepwise-BIC or
stepwise-testing.

Syntax

posw
depvar
varsofinterest
[if] [in]
,
controls(varlist)
model(linear|logit|poisson)
[method(bic|test) alpha(#)]

varsofinterest are variables for which coefficients and their
standard errors are estimated.

* controls(varlist) specify the set of control variables

* model(linear|logit|poisson) specify the model

method(bic|test) specify the stepwise method

alpha(#) specify the significance level if
stepwise-testing is used

* controls() and * model() are required.

Description

posw fits a high-dimensional linear, logit or Poisson regression model and
reports standard errors, test statistics, and confidence intervals for specified
covariates of interest. The stepwise-based partialing-out method developed in
D. Drukker and D. Liu (2021) is used to estimate effects for these variables and
to select from potential control variables to be included in the model.

Options

controls(varlist)
specifies the set of control variables, which control for omitted variables.
Control variables are also known as confounding variables. posw uses the
forward stepwise to select the control variables for each of depvar and
varsofinterest. controls() is required.

model(linear|logit|poisson)
specifies the model for the outcome variable depvar. It can be one of
linear, logit, or poisson model. model() is required.

method(bic|test)
specifies the method used in stepwise covariate-selection. It can be one of
bic and test. Specifying bic implies to use the BIC-based
stepwise. Specifying test implies to use the testing-based stepwise. The
default is bic.

alpha(#)
specifies the level of significance for the testing-based stepwise. The default
is 0.05.

Examples

Setup

. webuse breathe

Partialing-out linear regression for outcome reaction time and inference
on classroom and home nitrogen oxide using stepwise-BIC to select
controls

. posw react no2_class no2_home,
controls(i.(meducation overweight msmoke sex) noise_school sev_home sev_school age)
model(linear)

As above but use stepwise-testing to select controls

. posw react no2_class no2_home,
controls(i.(meducation overweight msmoke sex) noise_school sev_home sev_school age)
model(linear) method(test)

Stored results

posw stores the following in e():

Scalars

e(N) number of observations

e(k_controls) number of controls

e(k_controls_sel) number of selected controls

e(k_varsofinterest) number of variables of interest

Macros

e(cmd) posw

e(varsofinterest) variables of interest

e(depvar) dependent variable

e(controls_sel) selected control variables

e(controls) control variables

e(model) type of model

e(title) title in estimation output

e(vcetype) robust

e(vce) Robust

e(properties) b V

Matrices

e(b) coefficient vector

e(V) variance-covariance matrix of the estimators

Functions

e(sample) marks estimation sample

Reference

David M. Drukker and Di Liu, Finite sample results for lasso and stepwise
Neyman-orthogonal Poisson estimators, 2021