imlmreg2.fit | R Documentation |
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
imlmreg2.fit(
Y,
X,
Z,
weights = NULL,
Kern = "Euclid",
vctype = "HC0",
cluster = NULL,
clus.est.type = "A"
)
Y |
outcome variable |
X |
matrix of covariates. |
Z |
matrix of instruments |
weights |
a vector of length |
Kern |
type of kernel. See Details for available kernels |
vctype |
type of sandwich covariance matrix (see vcovHC) |
cluster |
vector of length |
clus.est.type |
options are "A" and "B". "A" sets |
The (i,j)
'th elements of available kernel methods are
Euclidean distance between two vectors: ||Z_i-Z_j||
The weighted Gaussian kernel: exp(-0.5(Z_i-Z_j)'V^-1(Z_i-Z_j)) where V is the variance of V
The unweighted Gaussian kernel: exp(-||Z_i-Z_j||^2)
The kernel of Dominguez & Lobato 2004: 1/n\sum{l=1}^n I(Z_i\le Z_l)I(Z_j\le Z_l)
The projected version of the DL in Escanciano 2006.
The kernel used in Antoine & Lavergne 2014. See page 60 of paper.
The Fuller (1977)-like modification of the kernel in Antoine & Lavergne 2014. See page 64 of paper.
an IV regression object which also contains coefficients, standard errors, etc.
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.