Skip to contents

endogCopula 0.2.0

Version 0.2.0 is a breaking release. The package was re-ported from a rewritten upstream reference implementation, and results from 0.1.0 will not reproduce exactly even when a call looks unchanged. Read the sections below before you re-run old code.

Breaking changes

  • cdf values. The argument now takes seven values instead of four. The old values "kde", "ecdf", "resc.ecdf" and "adj.ecdf" are gone. The closest replacements are "kde.silverman" for "kde", "ecdf.fixed" for "ecdf", "rank.n" for "resc.ecdf", and "ecdf.adj" for "adj.ecdf". Each replacement is a new implementation, not a renamed copy, so the numbers it produces can differ from the old one.
  • Fitted object class. A fitted model now has class "copreg". It was "endog_copula_fit" in 0.1.0. Code that checks the class directly, or that defines its own methods for the old class name, needs to switch to "copreg".
  • Panel and Bayesian wrappers removed. CopRegML_par() and CopRegBayes() are gone from endogCopula. The panel estimator is now CopRegPANEL() in the companion package endogCopulaPanel, and the Bayesian estimator is CopRegBAYES() in the companion package endogCopulaBayes. Both take the same two-part formula as the estimators in this package, and endogCopula no longer carries wrappers for either of them.
  • Default cdf values. Each estimator now defaults to the CDF its own paper uses, instead of a single shared default. CopRegPG() defaults to "kde.silverman", CopReg2sCOPE() and CopRegIMA() default to "rank.n", CopRegJAMS() defaults to "ecdf.adj", and CopRegBMW() defaults to "rank.n1". A call that does not set cdf explicitly can therefore return different results than it did in 0.1.0, even though nothing in the call changed.

New

  • copreg() as a single entry point for the six cross-sectional estimators, selected with method = "pg", "2scope", "ima", "bmw", "jams" or "np".
  • validity() for reporting the identifying assumptions behind a fitted model: nonnormality of the endogenous regressors, correlation with the exogenous side, and the standard error inflation relative to OLS.
  • Seven marginal CDF estimators to choose from with cdf: "kde.silverman", "kde.cv", "kde.plugin", "ecdf.fixed", "ecdf.adj", "rank.n" and "rank.n1".
  • Parallel bootstrap through parallel = and ncores =, spreading the resampling over forked processes on Unix and macOS or a PSOCK cluster on Windows.
  • ties = to choose between the counting function and midranks when the empirical CDF has to break ties.
  • update(), predict(), fitted(), vcov(), nobs() and formula() methods for a fitted "copreg" object, alongside the existing coef(), residuals(), confint(), print() and summary().
  • Estimator-specific additions: conditional = for CopRegJAMS(), letting the copula structure differ across categories of the exogenous factors; and condition =, groups =, heterogeneous =, demean =, bwmethod = and bw.refit = for CopReg2sCOPEnp(), controlling what the nonparametric conditional CDF conditions on and how its bandwidths are chosen.
  • summary() reports a Durbin-Hausman-Wu test next to the bootstrap one for CopRegBMW(), and a bootstrap Wald test of the copula terms, jointly and across categories, for CopRegJAMS().

Fixes

The entries below name real defects in 0.1.0, not changes in behavior. They are stated plainly because that is what happened.

  • CopRegPG() bootstrap standard errors. They did not match the reference implementation. The copula terms were transformed inside each bootstrap replicate but not in the reference, so every standard error, z value and p value that CopRegPG() reported in 0.1.0 was affected.
  • Aliased coefficients. A model with an aliased coefficient aborted instead of returning the fit.
  • Empty exogenous part. A formula whose exogenous part had no variables, for example y ~ z | 1, silently fitted the Park and Gupta estimator under the CopReg2sCOPE() and CopRegIMA() names, without saying so. The same formula now redirects to CopRegPG() with a warning.
  • CopReg2sCOPEnp() with no exogenous regressors. It silently used the raw conditional CDF value as the control function instead of its normal score, so the copula term was on the wrong scale.
  • The removed CopRegBayes() wrapper. It passed its data under the wrong argument name, so it failed for every input.
  • Dependencies. They were reduced to what the six cross-sectional estimators actually need. endogCopula now imports only Formula, parallel, stats and utils, and suggests np for CopReg2sCOPEnp() and cdf = "kde.cv". Matrix, dplyr, magrittr, nlme, rlang, copula, ks and pbapply are no longer used.

endogCopula 0.1.0

It was the first release of the package.