opt_auto: Automatically Find the Best Fitting Copula
Description
The parameters of 15 different circular-linear copulas are fitted to data
and sorted
according to AIC. For each copula, first, a starting value for the maximum
likelihood estimation (MLE) is found using fit_cylcop_cor().
Then, MLE is carried out with a "reasonable" setup using fit_cylcop_ml().
If MLE fails, parameters obtained with fit_cylcop_cor() are reported.
Usage
opt_auto(theta, x)
Value
A list containing 3 lists: Descriptions of the copulas, the
'cyl_copula' objects with fitted parameters, and the AIC.
The lists are sorted by ascending AIC.
If fit_cylcop_ml() has failed, the reported parameters are the ones obtained
with fit_cylcop_cor() and the AIC is set to NA.
Arguments
theta
numericvector of angles
(measurements of a circular variable).
x
numericvector of step lengths
(measurements of a linear variable).
set.seed(123)
#Optimal copula is independent of marginals.data <- rcylcop(100,cyl_quadsec(0.1))
#This takes a few seconds to run.copula_lst <- opt_auto(theta = data[,1], x = data[,2])