jepusto / clubSandwich

Cluster-robust (sandwich) variance estimators with small-sample corrections
http://jepusto.github.io/clubSandwich/
47 stars 8 forks source link

Test ivreg #81

Closed jzangela closed 2 years ago

jzangela commented 2 years ago

Renamed the test_ivreg_ivreg.R file and changed its path.

jzangela commented 2 years ago

Hi James,

I pushed some changes as discussed. Below is a brief summary.

  1. Added a check in the ivreg.R file to the function vcovCR.ivreg() that passes if method = 'OLS'but returns an error if method = 'M' or 'MM'. The error message is set up as "clubSandwich does not currently support ivreg models estimated using method = 'M' or method = 'MM'."
  2. Edited the documentation in the ivreg.R file to indicate that clubSandwich only works with ivreg models estimated using OLS.
  3. Edited the documentation in the ivreg.R file to include an example using the ivreg package with data from AER package.
  4. Add a unit test in the test_ivgre_ivreg.R file to verify that vcovCR.ivreg() returns an error.
  5. Edited the vcovCR.ivreg.Rd documentation to indicate that clubSandwich only works with ivreg models estimated using OLS.
  6. Updated the Description field in the DESCRIPTION file to indicate that clubSandwich now supports ivreg models from the ivreg package, when estimated by OLS.
  7. Updated the Suggests field in the DESCRIPTION file to add the ivreg package.

Please have a look and let me know if we are good to move forward or if we need any modifications.

Thanks!

Best regards, Jingru