set.seed(123)
sample <- rcylcop(100,cyl_quadsec(0.1))
fit_cylcop_ml(copula = cyl_quadsec(),
theta = sample[,1],
x = sample[,2],
parameters = "a",
start = 0
)
fit_cylcop_ml(copula = cyl_rect_combine(copula::frankCopula()),
theta = sample[,1],
x = sample[,2],
parameters = "alpha",
start = 1
)
sample <- rjoint(
n = 100,
copula = cyl_cubsec(0.1, -0.08),
marginal_1 = list(name = "vonmisesmix", coef = list(
mu = c(pi, 0),
kappa = c(2, 5),
prop = c(0.3, 0.7)
)),
marginal_2 = list(name = "exp", coef = list(0.3))
)
fit_cylcop_ml(copula = cyl_cubsec(),
theta = sample[,1],
x = sample[,2],
parameters = c("a","b"),
start = c(0,0),
upper= c(0.1, 1/(2*pi))
)
optML(copula = cyl_quadsec(),
theta = sample[,1],
x = sample[,2],
parameters = "a",
start = 0
)
Run the code above in your browser using DataLab