fitCopulaOne | R Documentation |
Fit bivariate data with the full-range tail dependence copula based on maximum likelihood
fitCopulaOne(
par0,
patternpar = seq(1, length(par0)),
dat,
flag = 1,
integration = F,
opt = "L-BFGS-B",
se = F,
lower = rep(0.1, length(unique(patternpar))),
upper = rep(5, length(unique(patternpar))),
trace = 0,
factr = 1e+09,
printlevel = 0,
copula_family = "PPPP"
)
trace, |
printlevel: integers for optim() and nlm(), respectively. (default: 0,0) |
par: |
initial parameters for (a, b) |
patternpar: |
a vector for assigning parameters to be estimated, and this allows same values of different parameters. For example, if patternpar=c(1,2,3,0,3), then there are 3 parameters to estimate, the 3rd and 5th ones are the same, and the 4th parameter is fixed as specified in the initial parameters (i.e., par) |
dat: |
input of data. |
flag: |
indicate which numerical method for the appell function (default: flag = 1) |
integration: |
(Experimental!) using integration instead of appellf1() |
se: |
whether standard errors of parameters are reported (default: se = F) |
# DO NOT run, and it takes time!
data("euro0306")
dat <- uscore(euro0306[,c(2,3)])[1:100,]
par0 <- c(0.3, 0.3)
fit <- fitCopulaOne(par0, dat=dat, copula_family="GGEE")
par0 <- c(0.3, 0.3, 1, 1)
lower <- rep(0.1, 2)
upper <- rep(5, 2)
par0 <- c(0.3, 0.3, 1, 1)
patternpar <- c(1,2,0,0) # the last two parameters are not to be estimated and fixed to be 1 as indicated in par0
fit1 <- fitCopulaOne(par0, patternpar=patternpar, dat=dat, lower=lower, upper=upper, copula_family="PPPP")
patternpar <- c(1,2,3,3) # the last two parameters are the same and are to be estimated
fit2 <- fitCopulaOne(par0, patternpar=patternpar, dat=dat, lower=lower, upper=upper, copula_family="PPPP")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.