search for: dispstr

Displaying 15 results from an estimated 15 matches for "dispstr".

2009 Apr 22
1
Copula package
Hi R-users, I would like to use the copula package.? I? the package plus the mvtnorm and try to run the example given, but I got the following message: install.packages(repos=NULL,pkgs="c:\\Tinn-R\\copula_0.8-3.zip") norm.cop <- normalCopula(c(0.5, 0.6, 0.7), dim = 3, dispstr = "un") t.cop <- tCopula(c(0.5, 0.3), dim = 3, dispstr = "toep", df = 2, df.fixed = TRUE) ## from the wrapper norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7), dim = 3, dispstr = "un") > install.packages(repos=NULL,pkgs="c:\\Tinn-R\\c...
2007 Mar 01
1
Fit Student Copula
Hello everybody, I have a big problem that I do not manage to solve ! I will be very grateful if you can solve this ! I want to fit a t Copula with the copula package : > student.cop <- ellipCopula("t", param = c(0.5, 0.6, 0.7), dim = 3, dispstr = "un",df=5) > x<-rcopula(student.cop,1000) > fit <- fitCopula(x, student.cop, c(0.5,0.5,0.5,5)) And there is an error for the optimization. Thanks a lot if you respond to me ! Pierre. ___________________________________________________________________________ Déc...
2007 Jun 22
2
fitCopula
I am using R 2.5.0 on windows XP and trying to fit copula. I see the following code works for some users, however my code crashes on the chol. Any suggestions? > mycop <- tCopula(param=0.5, dim=8, dispstr="ex", df=5) > x <- rcopula(mycop, 1000) > myfit <- fitCopula(x, mycop, c(0.6, 10), optim.control=list(trace=1), method="Nelder-Mead") Nelder-Mead direct search function minimizer function value for initial parameters = -1747.582044 Scaled convergence to...
2010 Jun 09
0
fitting t copula
Hi r-users, I try to fit the t copula using the gamma marginals.  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)   ## logl...
2013 Apr 21
1
Using copulas with user-defined marginal functions
...beta,sigma, x, y) {ifelse(y>0, dnorm(y,x%*%beta, sigma),(1-pnorm((x%*%beta)/sigma)))} ptobit <- function(beta,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...
2011 Sep 16
1
copula con marginales multivariantes
...ariantes, siguiendo el esquema del package ''Copula''. Es decir, Copula(F(x,y), G(w,z))) En el caso de funciones marginales univariantes, un ejemplo de la normal multivariante quedaria de la siguiente forma, copulagaussiana<-mvdc(normalCopula(vector_de_correlaciones,dim=3,dispstr ="un"),c(rep("norm",3)),list(param1,param2,param3)) donde ''vector_de_correlaciones'' es un vector con las componentes del triángulo superior de la matriz de correlaciones ordenadas adecuadamente. La función entiende así que la matriz es simétrica con elementos...
2006 Apr 24
3
the 'copula' package
Is anybody using the Copula package in R? The particular problem I'm facing is that R is not acknowledging the fitCopula command/function when I load the package and (try to) run something very simple: fit1 <- fitCopula(x1 = list(u11,u12,u13,u14,u15,u16,u17,u18), tCopula, optim.control = list(NULL), method = "BFGS") Anybody also using it, successfully or unsuccessfully?
2008 Jan 05
3
is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)
...- bs(1:99, df=5) > class(temp) [1] "bs" "basis" > is(temp, "basis") [1] FALSE In contrast, is() does catch parent S4 classes: > library(copula) > norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7), + dim = 3, dispstr = "un") > is(norm.cop, "copula") [1] TRUE > class(norm.cop) [1] "normalCopula" --please do not edit the information below-- Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386, mingw32 status = major = 2 minor = 6.1 year = 2007...
2007 Jan 18
0
fitCopula method in R
-- Hello, I am attempting to fit monthly stock returns to possible copula functions using the copula package in R. Below is my code (mat2 is a 2x119 matrix of the two stock returns): my.cop <- normalCopula(param=.3, dim = 2, dispstr = "un") myfit <- fitCopula(mat2,my.cop, start=.65, optim.control= list(NULL), method = "BFGS") myfit Unfortunately, I continue to receive this error: Error in optim(start, loglikCopula, method = method, copula = copula, : initial value in 'vmmin' is not fin...
2011 Aug 07
0
Fitting t copula
I'm a new user of R and a novice user in copula R package. I want to fit 3-dimensional t copula for my trivariate data. So I used the command t.cop <- tCopula(c(0.785,0.283,0.613),dim=3,dispstr="un",df=6,df.fixed = TRUE) where c(0.785,0.283,0.613) is the correlation pattern of my data with 0.785 pearson correlation between variable 1-2, 0.283 correlation between 1-3 and 0.613 is the correlation between variable 2-3. In given command degree of freedom (dof) is fixed at 6 and i...
2011 Aug 08
0
GOF of Student's t copula
Hi all, I need to test gof of 3-dimensional t copula for my trivariate observed data set. So I used the command t.cop <- tCopula(c(0.785,0.283,0.613),dim=3,dispstr="un",df=6,df.fixed = TRUE) where c(0.785,0.283,0.613) is the correlation pattern of my data with 0.785 pearson correlation between variable 1-2, 0.283 correlation between 1-3 and 0.613 is the correlation between variable 2-3. In given command degree of freedom (dof) is fixed, which i'...
2013 Apr 22
0
Copula fitMdvc:
...{ifelse(Y3>0, dnorm(Y3,x%*%beta, sigma),(1-pnorm((x%*%beta)/sigma)))} ptobit3 <- function(beta,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,rho1...
2010 Jun 10
0
error message fitting tcopula
...age.  I tried so many ways but still could not get it working.   loglik.marg <- function(b, x) sum(dgamma(x, shape = b[1], scale = 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...
2010 Jun 10
0
error message in fitting tcopula
...tried so many ways but still could not get it working. loglik.marg <- function(b, x) sum(dgamma(x, shape = b[1], scale = 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 <-...
2007 Jun 24
2
matlab/gauss code in R
...wachovia.net> > > Content-Type: text/plain > > I am using R 2.5.0 on windows XP and trying to fit copula. I see the > following code works for some users, however my code crashes on the > chol. Any suggestions? > > > > > mycop <- tCopula(param=0.5, dim=8, dispstr="ex", df=5) > > > x <- rcopula(mycop, 1000) > > > myfit <- fitCopula(x, mycop, c(0.6, 10), optim.control=list(trace=1), > method="Nelder-Mead") > > Nelder-Mead direct search function minimizer > > function value for initial parameters =...