mmdreg.fit: MMD Regression

View source: R/dCovReg.R

mmdreg.fitR Documentation

MMD Regression

Description

mmdreg.fit runs a linear minimum mean dependence (MMD) regression.

Usage

mmdreg.fit(Y, X, Z = X, cl = NULL)

Arguments

Y

outcome variable

X

matrix of covariates.

Z

matrix of instruments. Defaults to X.

cl

number of clusters to pass to pbsapply(). This is only advised in large samples.

Value

an IV regression object which also contains coefficients, standard errors, etc. The standard errors are computed based on a U-Statistics characterisation of the influence function

Examples

## Generate data and run MMD regression
n=200; set.seed(12); X = rnorm(n); er = rchisq(n,df=1)-1; Z=X; X=scale(abs(X))+er/sqrt(2)
Y=X+er
reg = mmdreg.fit(Y,X,Z) #run regression
## MMD coefficients, standard errors, and t-statistics
reg$MMD_coefficients; reg$MMD_SE; reg$MMD_tstat

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