mmdreg.fit | R Documentation |
mmdreg.fit
runs a linear minimum mean dependence (MMD) regression.
mmdreg.fit(Y, X, Z = X, cl = NULL)
Y |
outcome variable |
X |
matrix of covariates. |
Z |
matrix of instruments. Defaults to |
cl |
number of clusters to pass to |
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
## 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.