search for: frankcopula

Displaying 5 results from an estimated 5 matches for "frankcopula".

2018 Apr 21
2
Error : 'start' contains NA values when fitting frank copula
Hello! I am trying to fit a copula to some data in R and I get the error mentioned above. This is the code for a reproducible example - library(copula) data = matrix(data=runif(600),nrow=200,ncol=3) data[,2] = 2*data[,1] data[,3] = 3*data[,1] fr_cop = frankCopula(dim=3) fit_fr_cop = fitCopula(fr_cop,pobs(data),method = "mpl") #Error Here The error says : Error in fitCopula.ml(copula, u = data, method = method, start = start, : 'start' contains NA values What could be going wrong? [[alternative HTML version deleted]]
2018 Apr 21
0
Error : 'start' contains NA values when fitting frank copula
...e - (not really reproducible: You did not set the random seed, so the data is different every time; OTOH, yes, the following always gives an error) > library(copula) Slightly clearer showing what you are doing: x <- runif(200) data <- cbind(x, 2*x, 3*x) > fr_cop = frankCopula(dim=3) > fit_fr_cop = fitCopula(fr_cop, pobs(data), method = "mpl") #Error Here > The error says : Error in fitCopula.ml(copula, u = data, method = method, > start = start, : 'start' contains NA values > What could be going wrong? Is this a homework...
2017 Aug 06
1
Help with optim function in R, please?
...e to take the new values of the parameter (from M-step) and plug it in the weight, to get a new value of the weight. Then, iterate till converges. I tried the following code, but it does not work. library(copula) library(VineCopula) ## to generate the data set.seed(123) cp <- mixCopula(list(frankCopula(4),claytonCopula(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 <...
2012 Oct 19
1
quantile regression using copulas
Hi all, Has anyone used the qua.regressCOP2 function from the copBasic package??? The default copula function used in this function is plackett copula and I wanted to use archimedean copula. Attached below is my code: mycop<-frankCopula V=seq(0.001,0.99,by=0.000217) R<-qua.regressCOP2(0.25,V,cop=mycop,para=c(3.504)) And this is the error I get: Warning messages: 1: In qua.regressCOP2(0.25, V, cop = mycop, para = c(3.504)) : could not uniroot in derCOPinv2, skipping sample for i=4558 having V=0.989869 2: In qua.regressCOP2(0....
2006 May 12
3
Maximum likelihood estimate of bivariate vonmises-weibulldistribution
...-weibulldistribution look at the following code: library(copula) par(mfrow = c(2, 2)) x <- mvdc(normalCopula(sin(0.5 * pi /2)), c("norm", "norm"), list(list(mean = 0, sd = 1), list(mean = 0, sd = 1))) contour(x, dmvdc, xlim = c(-2.7, 2.7), ylim = c(-2.7, 2.7)) x <- mvdc(frankCopula(5.736276), c("norm", "norm"), list(list(mean = 0, sd = 1), list(mean = 0, sd = 1))) contour(x, dmvdc, xlim = c(-2.7, 2.7), ylim = c(-2.7, 2.7)) x <- mvdc(gumbelCopula(2), c("norm", "norm"), list(list(mean = 0, sd = 1), list(mean = 0, sd = 1))) contour(x,...