Description Details Author(s) References Examples
This package contains tools to find a robust instrumental variables estimator based on a high breakdown point S-estimator of location and covariance.
riv(Y, Xend, Xex = NULL, Zinst, dummies = NULL, method = c('S-est', 'SD-est', 'MCD-est', 'classical'), nsamp = 500, bdp = 0.5)
finds a robust instrumental variables estimator using a high breakdown point S-estimator of location and covariance.
G.V. Cohen-Freue gcohen@stat.ubc.ca
D. Cubranic cubranic@stat.ubc.ca
with contributions from B. Kaufmann beat.kaufmann@epfl.ch and R.H. Zamar ruben@stat.ubc.ca
LOPUHAA,H.P. (1989). On the Relation between S-estimators and M-estimators of Multivariate Location and Covariance. Ann. Statist. 17 1662-1683.
COHEN-FREUE, G.V., ORTIZ-MOLINA, H., and ZAMAR, R.H. (2012) A Natural Robustification of the Ordinary Instrumental Variables Estimator. Submitted to Biometrics.
1 2 3 4 5 | ## load data earthquake: the first column is the response Y, the second
## the endogenous variable X and the third column is the instrument
## Zinst.
data(earthquake)
riv(earthquake[,1], earthquake[,2], NULL, earthquake[,3])
|
Loading required package: MASS
Loading required package: rrcov
Loading required package: robustbase
Scalable Robust Estimators with High Breakdown Point (version 1.4-4)
Loading required package: quantreg
Loading required package: SparseM
Attaching package: 'SparseM'
The following object is masked from 'package:base':
backsolve
$Summary.Table
Coef Std.Err. t p.values
Intercept -3.951762 0.9663287 -4.089459 1.306733e-04
Xend1 1.723711 0.1842717 9.354180 2.513545e-13
$VC
Intercept Xend1
Intercept 0.9337912 -0.17756126
Xend1 -0.1775613 0.03395606
$MSE
[1] 3.357397e-01 4.230303e-05 2.407210e-01
$MD
[1] 2.6161475 2.1010582 3.7902163 0.6508990 1.2012693 0.3138404
[7] 1.8264816 2.4488099 2.7729167 0.7877147 0.8437099 3.3604647
[13] 1.7854074 3.0953708 0.9310053 10.2148784 2.9530246 0.4945655
[19] 3.8296050 1.1389122 1.0206674 2.9530246 2.6920210 1.3360838
[25] 11.5571788 2.2831379 4.4192500 21.6236724 0.9236091 5.6985392
[31] 3.5463859 6.8174751 1.8142599 2.7682896 6.5310250 5.6081253
[37] 1.2917857 1.1250621 4.4963653 0.7883974 1.1250621 3.4380920
[43] 2.4760525 6.1569889 8.3175502 2.1663636 0.7768855 1.0970172
[49] 1.0446232 6.6479281 4.0884032 1.2095466 1.3486368 23.8740477
[55] 0.5050098 1.9011834 1.1885103 1.3405075 2.2008037 11.9843475
[61] 3.0065766 3.1675395
$weight
[1] 1.669560e-02 1.859491e-02 1.274872e-02 2.449153e-02 2.215815e-02
[6] 2.597820e-02 1.964916e-02 1.730141e-02 1.613784e-02 2.390057e-02
[11] 2.366079e-02 1.413176e-02 1.980937e-02 1.502040e-02 2.328938e-02
[16] 5.620581e-04 1.550875e-02 2.517563e-02 1.262552e-02 2.241666e-02
[21] 2.291097e-02 1.550875e-02 1.642447e-02 2.160439e-02 2.571256e-05
[26] 1.791183e-02 1.085274e-02 0.000000e+00 2.332074e-02 7.467438e-03
[31] 1.352468e-02 5.023777e-03 1.969676e-02 1.615417e-02 5.603390e-03
[36] 7.685973e-03 2.178558e-02 2.247428e-02 1.063080e-02 2.389764e-02
[41] 2.247428e-02 1.387666e-02 1.720205e-02 6.407850e-03 2.505102e-03
[46] 1.834844e-02 2.394709e-02 2.259118e-02 2.281039e-02 5.363023e-03
[51] 1.183093e-02 2.212395e-02 2.155319e-02 0.000000e+00 2.512963e-02
[56] 1.935946e-02 2.221093e-02 2.158634e-02 1.821912e-02 0.000000e+00
[61] 1.532411e-02 1.477579e-02
There were 13 warnings (use warnings() to see them)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.