Fit the Gaussian-copula marginal regression by maximum likelihood
Source:R/copula_ml.R
fit_copula.RdFits the model of nll_copula() by BFGS (Nelder-Mead is unstable on this
likelihood surface; see the paper's pitfall 6), starting from the
independence-model fit, then computes standard errors from the numerical
Hessian with a relative step of 1e-3 (the numDeriv default, d = 0.1,
can push an autoregressive coefficient outside the stationary region near
the boundary; see the paper's pitfall 16).
Value
A list with components par (named numeric vector), se (standard
errors, NA if the Hessian is not invertible), loglik, npar, aic,
bic, family, p, q, tau, the inputs X, Z, y, and convergence
(as returned by stats::optim()).
Details
At tau other than the median, prefer fit_copula_multi_tau(): the
likelihood surface can have more than one interior stationary point at a
given tau, with different values, and a bare single-start fit_copula()
call is not guaranteed to land on the one with the higher likelihood (see
the paper's pitfall 1).