Displaying 1 result from an estimated 1 matches for "copula_est".
2007 Jan 21
1
for loop problem
...ought process:
Here "z" is a 119 x 15 data matrix
Step 1: start at column one, bind every column with column 1
Step2: use the new matrix, "test", in the fitCopula package
Step3: store each result in myfit, bind each result to "answer"
Step4: return "answer"
copula_est <- function(z)
{
for(i in 1:length(z[1,]))
{
my.cop <- normalCopula(param = 0.5, dim = 2)
test <- cbind(z[,1],z[,i])
myfit[i] <- fitCopula(test,my.cop, start=0.3)
}
answer <- cbind(myfit[i])
return(answer)
}
Errors received:
Error: object "test" not found
Could...