imlmreg2.fit: ICM-IV Regression

View source: R/dCovReg.R

imlmreg2.fitR Documentation

ICM-IV Regression

Description

imlmreg2.fit runs a generic linear integrated moment regression allowing for different kernels. This variant uses centred instruments in the meat of the sandwich matrix

Usage

imlmreg2.fit(
  Y,
  X,
  Z,
  weights = NULL,
  Kern = "Euclid",
  vctype = "HC0",
  cluster = NULL,
  clus.est.type = "A"
)

Arguments

Y

outcome variable

X

matrix of covariates.

Z

matrix of instruments

weights

a vector of length n of weights for observations

Kern

type of kernel. See Details for available kernels

vctype

type of sandwich covariance matrix (see vcovHC)

cluster

vector of length n with cluster assignments of observations.

clus.est.type

options are "A" and "B". "A" sets K(Z_i,Z_j)=0 for i,j in the same cluster while option "B" only does so for i=j.

Details

The (i,j)'th elements of available kernel methods are

"Euclid"

Euclidean distance between two vectors: ||Z_i-Z_j||

"Gauss.W"

The weighted Gaussian kernel: exp(-0.5(Z_i-Z_j)'V^-1(Z_i-Z_j)) where V is the variance of V

"Gauss"

The unweighted Gaussian kernel: exp(-||Z_i-Z_j||^2)

"DL"

The kernel of Dominguez & Lobato 2004: 1/n\sum{l=1}^n I(Z_i\le Z_l)I(Z_j\le Z_l)

"Esc6"

The projected version of the DL in Escanciano 2006.

"WMD"

The kernel used in Antoine & Lavergne 2014. See page 60 of paper.

"WMDF"

The Fuller (1977)-like modification of the kernel in Antoine & Lavergne 2014. See page 64 of paper.

Value

an IV regression object which also contains coefficients, standard errors, etc.

Examples

## Generate data and run MMD regression
n=200; set.seed(12); X = rnorm(n); er = (rchisq(n,df=1)-1)/sqrt(2); Z=X
X=scale(abs(X))+er/sqrt(2); Y=X+er
summary(imlmreg2.fit(Y=Y,X=X,Z=Z))
summary(ivreg::ivreg(formula = Y ~ X | Z)) #compare to conventional IV regression

estsyawo/bayesprdopt documentation built on April 2, 2024, 2:18 p.m.