Displaying 2 results from an estimated 2 matches for "rho13".
Did you mean:
rho1
2013 Apr 22
0
Copula fitMdvc:
...d1 <- Y1-as.matrix(cbind( 1,Xi))%*%fit1$coef
resid2 <- Y2-as.matrix(cbind( 1,Xi))%*%fit2$coef
resid3 <- Y3-as.matrix(cbind( 1,Xi))%*%fit3$coef
sigma1<-sum(resid1*resid1)/nrow(Xi)
sigma2<-sum(resid2*resid2)/nrow(Xi)
sigma3<-sum(resid3*resid3)/nrow(Xi)
rho12<- cor(resid1, resid2)
rho13<- cor(resid1, resid3)
rho23<- cor(resid2, resid3)
library("copula")
library(mvtnorm)
x<-as.matrix(cbind( 1,Xi))
km<- as.numeric(ncol(x))
#Parameters
beta <- rbind(rep(0,km))
sigma <- 1
rho <- 0.5
#user-defined functions
dtobit1 <- function(beta,sigma,x,y1) {ifelse...
2013 Apr 21
1
Using copulas with user-defined marginal functions
...dtobit <- function(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)...