Package riv. R topics documented: May 24, Title Robust Instrumental Variables Estimator. Version Date

Similar documents
Package ltsbase. R topics documented: February 20, 2015

Package gtheory. October 30, 2016

Package ShrinkCovMat

Package MultisiteMediation

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

Package ForecastCombinations

Package BNN. February 2, 2018

Package sbgcop. May 29, 2018

Package sscor. January 28, 2016

Package mmm. R topics documented: February 20, Type Package

Package SimSCRPiecewise

Package SpatialNP. June 5, 2018

Package cellwise. June 26, 2018

Package MicroMacroMultilevel

Package SK. May 16, 2018

Package reinforcedpred

Package factorqr. R topics documented: February 19, 2015

Package gma. September 19, 2017

Package TwoStepCLogit

Package darts. February 19, 2015

Package LPTime. March 3, 2015

Package depth.plot. December 20, 2015

Package EnergyOnlineCPM

Package jmcm. November 25, 2017

Package RootsExtremaInflections

Package pfa. July 4, 2016

Package weightquant. R topics documented: December 30, Type Package

Package milineage. October 20, 2017

Package JointModel. R topics documented: June 9, Title Semiparametric Joint Models for Longitudinal and Counting Processes Version 1.

Package Blendstat. February 21, 2018

Package InferenceSMR

Package ARCensReg. September 11, 2016

Package horseshoe. November 8, 2016

Package survidinri. February 20, 2015

Package asus. October 25, 2017

Package sodavis. May 13, 2018

Package tspi. August 7, 2017

Package p2distance. February 20, 2015

Package LBLGXE. R topics documented: July 20, Type Package

Package invgamma. May 7, 2017

Package ForwardSearch

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0.

Package HIMA. November 8, 2017

Package NonpModelCheck

Package univoutl. January 9, 2018

Package BayesNI. February 19, 2015

Package My.stepwise. June 29, 2017

Package MAVE. May 20, 2018

Package cccrm. July 8, 2015

Package covsep. May 6, 2018

Package ebal. R topics documented: February 19, Type Package

Package effectfusion

Package CPE. R topics documented: February 19, 2015

Package flexcwm. R topics documented: July 2, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.1.

An Object Oriented Framework for Robust Multivariate Analysis

Package mar. R topics documented: February 20, Title Multivariate AutoRegressive analysis Version Author S. M. Barbosa

Journal of Statistical Software

The S-estimator of multivariate location and scatter in Stata

Package gwqs. R topics documented: May 7, Type Package. Title Generalized Weighted Quantile Sum Regression. Version 1.1.0

Package rnmf. February 20, 2015

Practice exam questions

Package bhrcr. November 12, 2018

Package idmtpreg. February 27, 2018

Package bigtime. November 9, 2017

Package CARBayesdata

Package zic. August 22, 2017

Package rela. R topics documented: February 20, Version 4.1 Date Title Item Analysis Package with Standard Errors

Package comparec. R topics documented: February 19, Type Package

Package rgabriel. February 20, 2015

IMPROVING THE SMALL-SAMPLE EFFICIENCY OF A ROBUST CORRELATION MATRIX: A NOTE

Package QuantifQuantile

Package mlmmm. February 20, 2015

Package esreg. August 22, 2017

Package thief. R topics documented: January 24, Version 0.3 Title Temporal Hierarchical Forecasting

Package generalhoslem

Package RZigZag. April 30, 2018

Package severity. February 20, 2015

Package TSF. July 15, 2017

Package leiv. R topics documented: February 20, Version Type Package

Package face. January 19, 2018

Package spcov. R topics documented: February 20, 2015

Package clustergeneration

Package ivmodel. October 17, 2017

Package Tcomp. June 6, 2018

Package mpmcorrelogram

Package timelines. August 29, 2016

Package basad. November 20, 2017

Package IGG. R topics documented: April 9, 2018

Package stability. R topics documented: August 23, Type Package

Package elhmc. R topics documented: July 4, Type Package

Package MAPA. R topics documented: January 5, Type Package Title Multiple Aggregation Prediction Algorithm Version 2.0.4

Package drgee. November 8, 2016

Package nardl. R topics documented: May 7, Type Package

Package noncompliance

ARE THE BAD LEVERAGE POINTS THE MOST DIFFICULT PROBLEM FOR ESTIMATING THE UNDERLYING REGRESSION MODEL?

Package EMVS. April 24, 2018

Package Grace. R topics documented: April 9, Type Package

Package bivariate. December 10, 2018

Package SpatialVS. R topics documented: November 10, Title Spatial Variable Selection Version 1.1

Package ensemblepp. R topics documented: September 20, Title Ensemble Postprocessing Data Sets. Version

Transcription:

Title Robust Instrumental Variables Estimator Version 2.0-5 Date 2018-05-023 Package riv May 24, 2018 Author Gabriela Cohen-Freue and Davor Cubranic, with contributions from B. Kaufmann and R.H. Zamar Maintainer Gabriela Cohen-Freue <gcohen@stat.ubc.ca> Depends MASS, rrcov, quantreg Description Finds a robust instrumental variables estimator using a high breakdown point S-estimator of multivariate location and scatter matrix. License GPL-2 NeedsCompilation no RoxygenNote 6.0.1 Repository CRAN Date/Publication 2018-05-24 03:09:12 UTC R topics documented: riv-package......................................... 2 earthquake.......................................... 3 mortality........................................... 4 riv.............................................. 5 Index 8 1

2 riv-package riv-package Robust instrumental variables estimator package. Description This package contains tools to find a robust instrumental variables estimator based on a high breakdown point S-estimator of location and covariance. Details 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. Author(s) 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> References 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. Examples ## 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])

earthquake 3 earthquake Alaskan earthquakes data Description The dataset contains information about 62 Alaskan earthquakes that occured between 1969-1978 (Fuller, 1987). The goal is to see how the earthquake strength, measured in terms of the true value of the body waves, x, impacts on the amplitude of the surface waves of the earthquake (Y ). However, we do not observe x but X, which is the logarithm of the seismogram amplitude of longitudinal body waves measured at some observation stations, i.e., x i = x i + u i, for i = 1,..., 62, where u i is the measurement error of each observation. Thus, in the regression Y i = a + b X i + e i, the covariate X is an endogenous covariate. We can consistently estimate the regression parameters using instrumental variables estimators. The logarithm of maximum seismogram trace amplitude at short distance, W, can be used as an instrument. The first column in the dataset is the response (Y), the second column is the endogenous variable (X), and the third column is the instrument (W). Usage data(earthquake) Format A data frame with 62 observations on the following 3 variables. Y a numeric vector of the logarithm of the seismogram amplitude of 20 second waves. X a numeric vector of the logarithm of the seismogram amplitude of longitudinal body waves. W a numeric vector of the logarithm of maximum seismogram trace amplitude at short distance. Source FULLER,W.A. (1987). Measurement Error Models. Wiley, New York. References COHEN-FREUE,G.V. and ZAMAR,R.H. (2005). A Robust Instrumental Variables Estimator. Examples data(earthquake) plot(earthquake$x, earthquake$y, xlab="x", ylab="y")

4 mortality mortality Mortality rate data Description The dataset contains information about the mortality rate from 60 U.S. cities using aggregate information from the year 1969/70. Usage data(mortality) Format A data frame with 60 observations on the following 8 variables. MO70 a numeric vector of the total mortality (number of deaths per 1000 people) from 1970. MAGE a numeric vector of the median age of the population (in years) from 1969. CI68 a numeric vector of the number of packs of cigarettes per year per person. MDOC a numeric vector of the density of medical doctors (number of medical doctors per 100,000 people). DENS a numeric vector of the percentage of households with more than 1.5 persons per room. NONW a numeric vector of the fraction of the non-white population. EDUC a numeric vector of the percentage of the population over age 25 having a high-school diploma. IN69 a numeric vector of the median income from 1969. Source CROCKER,D.T. et al. (1979). Methods Development for Assessing Air Pollution Control Benefits, Vol. 1. Experiments in the Economics of Epidemiology. EPA-600/5-79-001a. Springfield, VA; National Technical Information Service. Examples data(mortality)

riv 5 riv Robust instrumental variables estimator Description Finds robust instrumental variables estimator using high breakdown point multivariate location and scatter matrix S-estimators. Usage riv(y, Xend, Xex=NULL, Zinst, dummies=null, method = c('s-est', 'SD-est', 'MCD-est', 'classical')) Arguments Y Xend Xex Zinst dummies method vector of responses. matrix of the endogenous variables, i.e. covariates that are correlated with the regression s error term. matrix of the exogenous variables, i.e. covariates that are uncorrelated with the regression s error term. Default = NULL, i.e. no exogenous variables are present in the model. matrix of instruments, variables correlated with the endogenous covariates, but uncorrelated with the error term. The number of instrumental variables needs to be larger than or equal to the number of endogenous covariates. matrix of exogenous dummy covariates, i.e., where each D i are 0 1 vectors. the method to be used. The "S-est" method (default) is based on the S-estimator of multivariate location and covariance, and "classical" method is based on the sample mean and covariance and the resulting estimator is equivalent to the two-stage least squares estimator (2SLS). See Details section. Details For method "S-est", RIV is constructed using the robust multivariate location and scatter S-estimator based on the Tukey s biweight function (see CovSest). If RIV is computed using the S-estimator, its variance-covariance matrix is estimated based on the empirical influence function. See references for more details. For method "SD-est", RIV is constructed using the Stahel-Donoho s robust multivariate location and scatter estimator (see CovSde). For method "MCD-est", RIV is constructed using the Minimum Covariance Determinant (MCD) robust multivariate location and scatter estimator (see CovMcd). For method "classical", the estimator is the classical instrumental variables estimator based on the sample mean and sample variance-covariance matrix (also known as the two-stage least squares estimator, 2SLS).

6 riv Value If the model contains dummy variables (i.e., dummies!= NULL), RIV is computed using an iterative algorithm called "L 1 -RIV". Briefly, L 1 -RIV estimates the coefficients of the dummies using an L 1 - estimator and the coefficients of the continuous covariates using the original RIV. See Cohen Freue et al. for more details. A list with components: Summary.Table VC MD MSE Matrix of information available about the estimator. It contains regression coefficients, and, for method = "S-est" and "classical" only, columns for the standard error, t-statistic, and p-value. estimated variance-covariance matrix, computed only if method = "S-est" or "classical" Squared Mahalanobis distances of each observation to the multivariate location S-estimator with respect to the scatter S-estimator (only computed if method = "S-est"). vector of three components, computed only if method = "S-est" or "classical": sigma.hat1: the mean square error estimation; sigma.hat2: the mean square error estimation taking into account the weights associated to each observation (only computed if method = "S-est" and coefficents of endogenous variables are exactly identified, i.e., the number of instruments is equal to the number of endogenous variables); sigma.hat3: the squared median absolute deviation (only computed if method = "S-est"). weight the weights assigned by RIV to each observation (only computed if method = "S-est" and the number of instruments is equal to the number of endogenous variables. References 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. See Also CovSest, CovSde, CovMcd Examples ## load data earthquake: the first column contains the response (Y), the ## second the endogenous variable (X) and the third column is the ## instrument (W). data(earthquake) riv.eq <- riv(earthquake$y,earthquake$x,null,earthquake$w)

riv 7 ## plot of the RIV estimates and the outlying observations are ## identified by filled points plot(earthquake$x,earthquake$y,xlab="x",ylab="y",cex=1.5) abline(riv.eq$summary.table[,1]) outliers <- which(sqrt(riv.eq$md)>sqrt(qchisq(0.99, 3))) text(earthquake[outliers,2], earthquake[outliers,1], outliers, pos=c(4,4,4,2)) points(earthquake[outliers,2], earthquake[outliers,1], cex=1.5,pch=19) ## Weights given by RIV to each observation as a function of the square ## root of the Mahalanobis distances (d) of each observation to the ## multivariate location and covariance S-estimator (computed with ## CovSest in rrcov) plot(sqrt(riv.eq$md),riv.eq$weight,xlab="d",ylab="riv's Weights",cex = 1.5) abline(h=sqrt(qchisq(0.99, 3))) text(sqrt(riv.eq$md)[outliers], riv.eq$weight[outliers], outliers, pos=c(2, 1, 1, 4)) points(sqrt(riv.eq$md)[outliers], riv.eq$weight[outliers], cex=1.5, pch=19) ## load data mortality data(mortality) Y <- as.matrix(mortality[,1]) ## M070 Xex <- as.matrix(mortality[,c(2,3,5,6)]) ## MAGE,CI68,DENS,NONW Xend <- as.matrix(mortality[,4]) ## MDOC colnames(xend) <- colnames(mortality)[4] Zinst <- as.matrix(mortality[,7:8]) ## EDUC,IN69 ## Classical instrumental variables estimator riv(y, Xend, Xex, Zinst, method="classical")

Index Topic datasets earthquake, 3 mortality, 4 Topic multivariate riv, 5 riv-package, 2 Topic robust riv, 5 CovMcd, 6 CovSde, 6 CovSest, 6 earthquake, 3 mortality, 4 riv, 5 riv-package, 2 8