Identification, Estimation and Inference Based on Structural Error Projection

Estimation and inference for regression models with endogenous regressors using a semiparametric projection approach. Instrumental variables are constructed internally from observed regressors by projecting out a space of basis functions used to represent the conditional mean of the structural error. A least absolute shrinkage and selection operator (LASSO) procedure selects basis functions for the projection. Tools are provided for simulation studies and empirical applications. The methods are based on Dong, Gao, Linton and Peng (2026) .


SIVMethod

Overview

SIVMethod provides a computational toolkit for Identification, Estimation and Inference Based on Structural Error Projection proposed by Dong, Gao, Linton, and Peng (2026). It is designed to address endogeneity in regression models by constructing instruments directly from observed regressors, entirely eliminating the reliance on externally supplied instruments.

Key features include:

Sim: A unified simulation engine to replicate Example B.2.1.

Sim_test: A unified simulation engine to replicate Example B.2.3.

SIV: The core implementation of the Semiparametric Instrumental Variable estimator.

Installation

You can install the released version from GitHub with:

# install.packages("pak")
pak::pak("Greatknee/SIVMethod")

Usage

For Reproduction of Example B.2.1

Sim()

For Reproduction of Example B.2.3

Sim_test()

Theoretical Foundation

Consider a linear model:

$$y=\mathbf{x}^\top \beta+\epsilon,$$

where $\text{E}[\epsilon]=0$ but $\ \text{E}[\mathbf{x}\epsilon]\neq 0$. We define the conditional expectation of the error and the subsequent error as:

$$ m(x)=E[\epsilon|x] \ \text{and} \ e=\epsilon−m(x)=y−x^\top\beta−m(x).$$

Assume $m(\mathbf{x})$ can be approximated using a vector of orthogonal series functions. Let $m(\mathbf{x}) = \mathbf{v}(\mathbf{x})^\top\boldsymbol{\gamma}$, where $\boldsymbol{\gamma} = (\gamma_1, \dots, \gamma_k)^\top$ is a vector of unknown coefficients, and $\mathbf{v}(\mathbf{x}) \equiv \mathbf{V}_k(\mathbf{x}) = (\psi_1(\mathbf{x}), \dots, \psi_k(\mathbf{x}))^\top$ is the basis vector with a fixed, finite truncation parameter $k$. The model can then be rewritten as:

$$y = \mathbf{x}^\top \beta + \mathbf{v}^\top\boldsymbol{\gamma} + e,$$

where $\mathbb{E}[e|\mathbf{x}] = 0$.

By projecting out the basis functions, the structural equation becomes:

$$w = \mathbf{z}^\top \beta_0 + e,$$

where the constructed instrument $\mathbf{z} = \mathbf{x} - \mathbb{E}[\mathbf{x}\mathbf{v}^\top] \mathbb{E}[\mathbf{v}\mathbf{v}^\top]^{-1} \mathbf{v}$ satisfies the exogeneity condition $\mathbb{E}[e|\mathbf{z}] = \mathbb{E}[\mathbb{E}[e|\mathbf{x}]|\mathbf{z}] = 0$. Provided that $\mathbb{E}[\mathbf{z}\mathbf{z}^\top] > 0$, $\mathbf{z}$ serves as a valid internal instrumental variable.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("SIVMethod")

0.1.0 by Yuhuai Chen, 21 days ago


https://github.com/Greatknee/SIVMethod


Report a bug at https://github.com/Greatknee/SIVMethod/issues


Browse source code at https://github.com/cran/SIVMethod


Authors: Yuhuai Chen [aut, cre] , Chaohua Dong [aut] , Jiti Gao [aut] , Linton Oliver [aut] , Bin Peng [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports glmnet, stats, utils

Suggests testthat


See at CRAN