[Returnanalytics-commits] r3714 - pkg/Dowd/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 22 18:29:03 CEST 2015


Author: dacharya
Date: 2015-06-22 18:29:03 +0200 (Mon, 22 Jun 2015)
New Revision: 3714

Modified:
   pkg/Dowd/R/MEFPlot.R
Log:
Variable "mef" that was not initialized before was initialized.

Modified: pkg/Dowd/R/MEFPlot.R
===================================================================
--- pkg/Dowd/R/MEFPlot.R	2015-06-22 15:28:13 UTC (rev 3713)
+++ pkg/Dowd/R/MEFPlot.R	2015-06-22 16:29:03 UTC (rev 3714)
@@ -21,7 +21,7 @@
   }
   u <- data
   n <- length(u)
-  mef <- 
+  mef <- double(n-1)
   for (i in 1:n - 1) {
     data <- data[which(data > u[i])]
     mef[i] <- mean(data) - u[i]
@@ -30,4 +30,4 @@
   plot(u, mef, type = "l", xlab = "Threshold", ylab = "e(u)", 
        main = "Empirical Mean Excess Function")
   
-} 
\ No newline at end of file
+} 



More information about the Returnanalytics-commits mailing list