[Distr-commits] r470 - branches/distr-2.2/pkg/distrEx/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu May 14 15:36:46 CEST 2009


Author: ruckdeschel
Date: 2009-05-14 15:36:46 +0200 (Thu, 14 May 2009)
New Revision: 470

Modified:
   branches/distr-2.2/pkg/distrEx/R/Expectation.R
Log:
fixed a stupid bug (ARGH)! --- forgot to write the expectations of different components into different coordinates of vector Ei...

Modified: branches/distr-2.2/pkg/distrEx/R/Expectation.R
===================================================================
--- branches/distr-2.2/pkg/distrEx/R/Expectation.R	2009-05-14 13:28:14 UTC (rev 469)
+++ branches/distr-2.2/pkg/distrEx/R/Expectation.R	2009-05-14 13:36:46 UTC (rev 470)
@@ -880,7 +880,7 @@
         l <- length(object at mixCoeff)
         Ei <- numeric(l)
         for(i in 1:l)
-            Ei <- object at mixCoeff[i] * E(object = object at mixDistr[[i]], low = low, 
+            Ei[i] <- object at mixCoeff[i] * E(object = object at mixDistr[[i]], low = low, 
                                          upp = upp, rel.tol = rel.tol,
                                          lowerTruncQuantile = lowerTruncQuantile, 
                                          upperTruncQuantile = upperTruncQuantile, 
@@ -898,7 +898,7 @@
         l <- length(object at mixCoeff)
         Ei <- numeric(l)
         for(i in 1:l)
-            Ei <- object at mixCoeff[i] * E(object = object at mixDistr[[i]], 
+            Ei[i] <- object at mixCoeff[i] * E(object = object at mixDistr[[i]], 
                                          fun = fun, low = low, 
                                          upp = upp, rel.tol = rel.tol,
                                          lowerTruncQuantile = lowerTruncQuantile, 
@@ -917,7 +917,7 @@
         l <- length(object at mixCoeff)
         Ei <- numeric(l)
         for(i in 1:l)
-            Ei <- object at mixCoeff[i] * E(object = object at mixDistr[[i]], 
+            Ei[i] <- object at mixCoeff[i] * E(object = object at mixDistr[[i]], 
                                          cond = cond, low = low, 
                                          upp = upp, rel.tol = rel.tol,
                                          lowerTruncQuantile = lowerTruncQuantile, 
@@ -937,7 +937,7 @@
         l <- length(object at mixCoeff)
         Ei <- numeric(l)
         for(i in 1:l)
-            Ei <- object at mixCoeff[i] * E(object = object at mixDistr[[i]], 
+            Ei[i] <- object at mixCoeff[i] * E(object = object at mixDistr[[i]], 
                                          cond = cond, fun = fun, low = low, 
                                          upp = upp, rel.tol = rel.tol,
                                          lowerTruncQuantile = lowerTruncQuantile, 



More information about the Distr-commits mailing list