[Returnanalytics-commits] r3698 - pkg/Dowd/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jun 22 15:46:41 CEST 2015
Author: dacharya
Date: 2015-06-22 15:46:41 +0200 (Mon, 22 Jun 2015)
New Revision: 3698
Modified:
pkg/Dowd/R/CdfOfSumUsingGaussianCopula.R
Log:
Wrongly ported initialization corrected (double(x,y) -> matrix(0,x,y)).
Modified: pkg/Dowd/R/CdfOfSumUsingGaussianCopula.R
===================================================================
--- pkg/Dowd/R/CdfOfSumUsingGaussianCopula.R 2015-06-22 13:45:09 UTC (rev 3697)
+++ pkg/Dowd/R/CdfOfSumUsingGaussianCopula.R 2015-06-22 13:46:41 UTC (rev 3698)
@@ -84,7 +84,7 @@
# Obtain copula as approximate double sum, which appriximates the 'true'
# double integral
- term <- double(length(x),length(y))
+ term <- matrix(0, length(x),length(y))
for (i in 1:length(x)) {
for (j in 1:length(y)) {
term[i, j] <- exp(-(x[i]^2-2*rho*x[i]*y[j]+y[j]^2)/(2*(1-rho^2)))
More information about the Returnanalytics-commits
mailing list