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
-
cdfvalues. 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()andCopRegBayes()are gone from endogCopula. The panel estimator is nowCopRegPANEL()in the companion packageendogCopulaPanel, and the Bayesian estimator isCopRegBAYES()in the companion packageendogCopulaBayes. Both take the same two-part formula as the estimators in this package, and endogCopula no longer carries wrappers for either of them. -
Default
cdfvalues. Each estimator now defaults to the CDF its own paper uses, instead of a single shared default.CopRegPG()defaults to"kde.silverman",CopReg2sCOPE()andCopRegIMA()default to"rank.n",CopRegJAMS()defaults to"ecdf.adj", andCopRegBMW()defaults to"rank.n1". A call that does not setcdfexplicitly 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 withmethod = "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 =andncores =, 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()andformula()methods for a fitted"copreg"object, alongside the existingcoef(),residuals(),confint(),print()andsummary(). - Estimator-specific additions:
conditional =forCopRegJAMS(), letting the copula structure differ across categories of the exogenous factors; andcondition =,groups =,heterogeneous =,demean =,bwmethod =andbw.refit =forCopReg2sCOPEnp(), 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 forCopRegBMW(), and a bootstrap Wald test of the copula terms, jointly and across categories, forCopRegJAMS().
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 thatCopRegPG()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 theCopReg2sCOPE()andCopRegIMA()names, without saying so. The same formula now redirects toCopRegPG()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()andcdf = "kde.cv". Matrix, dplyr, magrittr, nlme, rlang, copula, ks and pbapply are no longer used.
