search for: optim_1

Displaying 1 result from an estimated 1 matches for "optim_1".

Did you mean: optim
2017 Aug 06
1
Help with optim function in R, please?
...Copula(2))) cop <- rCopula(100,cp) x <- pobs(cop) ## this is the data ## my function including optim function myfunc <- function(data,copula=list(frankCopula(4,dim=2), claytonCopula(0.5,dim=2)),maxit=200){ ? ??# copula[[1]]@parameters <- par[1] ? # copula[[2]]@parameters <- par[2] ? optim_1 <- function(par, data.=data, copula.=copula){ ??? copula[[1]]@parameters <- par[1] ??? copula[[2]]@parameters <- par[2] ??? tau_1 <- par[3]*dCopula(data,copula[[1]],log = F) ??? tau_2 <- par[4]*dCopula(data,copula[[2]],log=F) ??? Tau_1 <- tau_1 / sum(tau_1 + tau_2) ??? Tau_2 <-...