search for: parammargins

Displaying 7 results from an estimated 7 matches for "parammargins".

2010 Jun 09
0
fitting t copula
...ls.  But I got error message which I don't really understand. Thank you for any help given. myCop.t <- ellipCopula(family = "t", dim = 2, dispstr = "toep", param = 0.5, df = 8) myCop.t myMvd <- mvdc(copula = myCop.t, margins = c("gamma", "gamma"), paramMargins = list(list(mean = 0, sd = 2), list(mean = 0, sd = 1))) myMvd dat <- stn_pos ## observed data loglikMvdc(c(0, 2, 0, 1, 0.5,8), dat, myMvd)   ## loglikelihood mm <- apply(dat, 2, mean) vv <- apply(dat, 2, var) rho <- rcorr(stn_pos,type="spearman")[[1]]; round(rho,2) rbind(mm,vv...
2013 Apr 21
1
Using copulas with user-defined marginal functions
...ta,sigma, x, y) {ifelse(y>0, pnorm((y-x%*%beta)/sigma),(1-pnorm((x%*%beta)/sigma)))} myMvdc <- mvdc(copula = ellipCopula("normal", param = c(rho12, rho13, rho23),dim = 3, dispstr = "un"), margins = c("tobit", "tobit", "tobit"), paramMargins = list(list(beta=beta1,sigma=s1), list(beta=beta2,sigma=s2), list(beta=beta3,sigma=s3))) mydmvdc <- dMvdc(y, myMvdc) Error in eval(expr, envir, enclos) : could not find function "ptobit" Thanks in advance, Elisa. [[alternative HTML version deleted]]
2013 Apr 22
0
Copula fitMdvc:
...a,sigma,x,y3) {ifelse(Y3>0, pnorm((Y3-x%*%beta)/sigma),(1-pnorm((x%*%beta)/sigma)))} #mvdc object myMvdc <- mvdc(copula = ellipCopula("normal", param = c(rho12, rho13, rho23),dim = 3, dispstr = "un"), margins = c("tobit1", "tobit2", "tobit3"), paramMargins = list(list(beta=fit1$coef,sigma=sigma1), list(beta=fit2$coef,sigma=sigma2), list(beta=fit3$coef,sigma=sigma3))) start <- as.vector(c(fit1$coef,sigma1, fit2$coef,sigma2, fit3$coef,sigma3,rho12,rho13,rho23)) #MLE fit <- fitMvdc(as.matrix(cbind(Y1,Y2,Y3)), myMvdc , start = start , optim.contro...
2013 May 03
0
Empirica Copula
...per,rate=0.5)} qper<-function(per){qexp(c(seq(0,1,.01)),per, rate=0.5)} gmb<-gumbelCopula(3,dim=2) # create bivariate copula object with dim=2 #tau(gmb) ## construct a bivariate distribution with defined marginals myCDF<- mvdc(gmb, margins=c("exp","exp"), paramMargins=list(list(rate=0.5),list(rate=0.5))) # Use own data for bivariate CDF construction myCDF2<- mvdc(gmb, margins=c("SAR","per"), paramMargins=list(list(rate=.5),list(rate=.5))) # Generate (bivariate) random numbers from that, and visualize x <- rMvdc(1000, myCDF...
2011 Jun 01
0
problems with copula
...can't add a number of margins> 3, I have a problem with the graphics. Post here my script: > myCop.norm <- ellipCopula(family = "normal", dim = 3, param = 0.4) > myMvd <- mvdc(copula = myCop.norm, margins = c("norm", "norm","norm"), > paramMargins = list(list(mean = 0, sd = 2), list(mean = 0, sd = > 1),list(mean=0,sd=2))) persp(myMvd, dmvdc, xlim = c(-4, 4), ylim=c(-4, 4),main="Normal copula") I obtain the following message of error : "Error in eval index out of bound" Help me!!!! thanks http://r.789695.n4.nab...
2010 Jun 10
0
error message fitting tcopula
...e = b[2], log = TRUE))   ctrl <- list(fnscale = -1)   #dat <- stn_pos[,1:2] ## observed data myCop.t <- ellipCopula(family = "t", param = 0.5,dim = 2, dispstr = "un", df = 8) myCop.t   myMvd <- mvdc(copula = myCop.t, margins = c("gamma", "gamma"), paramMargins = list(list(shape = 1.5, scale = 38), list(shape = 1.7, scale = 50))) myMvd n <- 200 dat <- rmvdc(myMvd, n)   mm <- apply(dat, 2, mean) vv <- apply(dat, 2, var) rho <- rcorr(dat,type="spearman")[[1]]; round(rho,2) rbind(mm,vv)   b1.0 <- c(mm[1]^2/vv[1], vv[1]/mm[1]) b2....
2010 Jun 10
0
error message in fitting tcopula
..., log = TRUE)) ctrl <- list(fnscale = -1) #dat <- stn_pos[,1:2] ## observed data myCop.t <- ellipCopula(family = "t", param = 0.5,dim = 2, dispstr = "un", df = 8) myCop.t myMvd <- mvdc(copula = myCop.t, margins = c("gamma", "gamma"), paramMargins = list(list(shape = 1.5, scale = 38), list(shape = 1.7, scale = 50))) myMvd n <- 200 dat <- rmvdc(myMvd, n) mm <- apply(dat, 2, mean) vv <- apply(dat, 2, var) rho <- rcorr(dat,type="spearman")[[1]]; round(rho,2) rbind(mm,vv) b1.0 <- c(mm[1]^2/vv[1], vv[1]...