Last chance! 50% off unlimited learning
Sale ends in
Estimate the correlation parameter of the (bivariate) Clayton copula distribution by maximum likelihood estimation.
biclaytoncop(lapar = "loglink", iapar = NULL, imethod = 1,
parallel = FALSE, zero = NULL)
Details at CommonVGAMffArguments
.
See Links
for more link function choices.
Details at CommonVGAMffArguments
.
If parallel = TRUE
then the constraint is also applied
to the intercept.
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
and vgam
.
The cumulative distribution function is
This VGAM family function can handle multiple responses, for example, a six-column matrix where the first 2 columns is the first out of three responses, the next 2 columns being the next response, etc.
Clayton, D. (1982) A model for association in bivariate survival data. Journal of the Royal Statistical Society, Series B, Methodological, 44, 414--422.
Stober, J. and Schepsmeier, U. (2013) Derivatives and Fisher information of bivariate copulas. Statistical Papers.
# NOT RUN {
ymat <- rbiclaytoncop(n = (nn <- 1000), apar = exp(2))
bdata <- data.frame(y1 = ymat[, 1],
y2 = ymat[, 2],
y3 = ymat[, 1],
y4 = ymat[, 2],
x2 = runif(nn))
summary(bdata)
# }
# NOT RUN {
plot(ymat, col = "blue")
# }
# NOT RUN {
fit1 <- vglm(cbind(y1, y2, y3, y4) ~ 1, # 2 responses, e.g., (y1,y2) is the first
biclaytoncop, data = bdata,
trace = TRUE, crit = "coef") # Sometimes a good idea
coef(fit1, matrix = TRUE)
Coef(fit1)
head(fitted(fit1))
summary(fit1)
# Another example; apar is a function of x2
bdata <- transform(bdata, apar = exp(-0.5 + x2))
ymat <- rbiclaytoncop(n = nn, apar = with(bdata, apar))
bdata <- transform(bdata, y5 = ymat[, 1],
y6 = ymat[, 2])
fit2 <- vgam(cbind(y5, y6) ~ s(x2), data = bdata,
biclaytoncop(lapar = "loglink"), trace = TRUE)
# }
# NOT RUN {
plot(fit2, lcol = "blue", scol = "orange", se = TRUE, las = 1)
# }
Run the code above in your browser using DataLab