The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
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.
You can install the released version from GitHub with:
# install.packages("pak")
pak::pak("Greatknee/SIVMethod")Sim()Sim_test()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.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.