[Distr-commits] r180 - branches/distr-2.0/pkg/distr/R branches/distr-2.0/pkg/distrEx/R pkg/distr/chm pkg/distrEx/R pkg/distrEx/chm pkg/distrEx/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 17 11:51:46 CEST 2008


Author: ruckdeschel
Date: 2008-06-17 11:51:46 +0200 (Tue, 17 Jun 2008)
New Revision: 180

Modified:
   branches/distr-2.0/pkg/distr/R/internalUtils.R
   branches/distr-2.0/pkg/distrEx/R/HellingerDist.R
   branches/distr-2.0/pkg/distrEx/R/Internalfunctions.R
   pkg/distr/chm/Distr.chm
   pkg/distr/chm/Distr.hhp
   pkg/distr/chm/Distr.toc
   pkg/distr/chm/gap-methods.html
   pkg/distr/chm/internals.html
   pkg/distrEx/R/HellingerDist.R
   pkg/distrEx/R/Internalfunctions.R
   pkg/distrEx/chm/00Index.html
   pkg/distrEx/chm/ConvexContamination.html
   pkg/distrEx/chm/E.html
   pkg/distrEx/chm/HellingerDist.html
   pkg/distrEx/chm/TotalVarDist.html
   pkg/distrEx/chm/Var.html
   pkg/distrEx/chm/distrEx.chm
   pkg/distrEx/chm/distrEx.toc
   pkg/distrEx/src/distrEx.dll
Log:
fixed bugs which became apparent in Matthias' demo...


Modified: branches/distr-2.0/pkg/distr/R/internalUtils.R
===================================================================
--- branches/distr-2.0/pkg/distr/R/internalUtils.R	2008-06-16 09:21:37 UTC (rev 179)
+++ branches/distr-2.0/pkg/distr/R/internalUtils.R	2008-06-17 09:51:46 UTC (rev 180)
@@ -673,9 +673,9 @@
          if ((l%%2==0)&& is.null(myPf)){
                l2 <- l/2
                if (is.null(pxl))
-                   x.l <- c(x[1:l2],(x[l2]+x[l2+1])/2,x[l2+1:l])
+                   x.l <- c(x[1:l2],(x[l2]+x[l2+1])/2,x[(l2+1):l])
                if (is.null(pxu))
-                   x.u <- c(x[1:l2],(x[l2]+x[l2+1])/2,x[l2+1:l])
+                   x.u <- c(x[1:l2],(x[l2]+x[l2+1])/2,x[(l2+1):l])
                l <- l+1
                }
          cfun <- .csimpsum

Modified: branches/distr-2.0/pkg/distrEx/R/HellingerDist.R
===================================================================
--- branches/distr-2.0/pkg/distrEx/R/HellingerDist.R	2008-06-16 09:21:37 UTC (rev 179)
+++ branches/distr-2.0/pkg/distrEx/R/HellingerDist.R	2008-06-17 09:51:46 UTC (rev 180)
@@ -6,18 +6,10 @@
                                      e2 = "AbscontDistribution"),
     function(e1, e2){
         TruncQuantile <- getdistrOption("TruncQuantile")  
-        lower1 <- ifelse(is.nan(q(e1)(0)), q(e1)(TruncQuantile), q(e1)(0))
-        upper1 <- ifelse(is.nan(q(e1)(1)), 
-                         ifelse("lower.tail" %in% names(formals(e1 at q)),
-                                q(e1)(TruncQuantile, lower.tail = FALSE),
-                                q(e1)(1-TruncQuantile)), 
-                         q(e1)(1))
-        lower2 <- ifelse(is.nan(q(e2)(0)), q(e2)(TruncQuantile), q(e2)(0))
-        upper2 <- ifelse(is.nan(q(e2)(1)), 
-                         ifelse("lower.tail" %in% names(formals(e2 at q)),
-                                q(e2)(TruncQuantile, lower.tail = FALSE),
-                                q(e2)(1-TruncQuantile)), 
-                         q(e2)(1))
+        lower1 <- getLow(e1)
+        upper1 <- getUp(e1)
+        lower2 <- getLow(e2)
+        upper2 <- getUp(e2)
         lower <- min(lower1, lower2)
         upper <- max(upper1, upper2)
 

Modified: branches/distr-2.0/pkg/distrEx/R/Internalfunctions.R
===================================================================
--- branches/distr-2.0/pkg/distrEx/R/Internalfunctions.R	2008-06-16 09:21:37 UTC (rev 179)
+++ branches/distr-2.0/pkg/distrEx/R/Internalfunctions.R	2008-06-17 09:51:46 UTC (rev 180)
@@ -3,11 +3,13 @@
 ## discretize distributions
 .discretizeDistr <- function(D, x, lower, upper, n){
     y <- seq(from = lower, to = upper, length = n)
+    x <- x[x<=upper & x>=lower]
     supp <- y[-1]-(y[2]-y[1])/2
     prob <- diff(p(D)(y))
     prob[1] <- prob[1] + p(D)(y[1])
     prob[n-1] <- prob[n-1] + p(D)(y[n], lower = FALSE)
     ind <- sapply(x, function(x, y) which.min(abs(x-y)), y)
+    ind <- ind[ind<n]
     tab <- table(ind)
     if(any(tab > 1)){
         tab.names <- as.integer(names(tab))
@@ -16,16 +18,19 @@
         j <- 0
         for(i in tab.names){
             nr <- sum(ind == i)
-            if(nr == 1){
-                supp[i] <- x[which(ind == i)]
-            }else{
-                j.alt <- j
-                j <- j + nr
-                supp[i] <- NA
-                add.supp[(j.alt+1):j] <- x[which(ind == i)]
-                add.prob[(j.alt+1):j] <- prob[i]/nr
-                prob[i] <- NA
-            }
+            if(nr > 0)  
+              {
+               if(nr == 1){
+                     supp[i] <- x[which(ind == i)]
+               }else{
+                     j.alt <- j
+                     j <- j + nr
+                     supp[i] <- NA
+                     add.supp[(j.alt+1):j] <- x[which(ind == i)]
+                     add.prob[(j.alt+1):j] <- prob[i]/nr
+                     prob[i] <- NA
+                    }
+              }      
         }
         supp <- c(supp, add.supp)
         supp <- supp[!is.na(supp)]

Modified: pkg/distr/chm/Distr.chm
===================================================================
(Binary files differ)

Modified: pkg/distr/chm/Distr.hhp
===================================================================
--- pkg/distr/chm/Distr.hhp	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distr/chm/Distr.hhp	2008-06-17 09:51:46 UTC (rev 180)
@@ -45,6 +45,7 @@
 Huberize-methods.html
 Hyper-class.html
 HyperParameter-class.html
+Integer-class.html
 Lattice-class.html
 LatticeDistribution-class.html
 LatticeDistribution.html

Modified: pkg/distr/chm/Distr.toc
===================================================================
--- pkg/distr/chm/Distr.toc	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distr/chm/Distr.toc	2008-06-17 09:51:46 UTC (rev 180)
@@ -647,7 +647,7 @@
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
 <param name="Name" value="coerce,numeric,Integer-method">
-<param name="Local" value="internals.html">
+<param name="Local" value="Integer-class.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
 <param name="Name" value="coerce,UnivariateDistribution,UnivarDistrList-method">
@@ -782,6 +782,10 @@
 <param name="Local" value="distroptions.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="devNew">
+<param name="Local" value="internals.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="DExp">
 <param name="Local" value="DExp-class.html">
 </OBJECT>
@@ -1430,6 +1434,10 @@
 <param name="Local" value="WeibullParameter-class.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Integer-class">
+<param name="Local" value="Integer-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="internals_for_distr">
 <param name="Local" value="internals.html">
 </OBJECT>
@@ -3459,6 +3467,10 @@
 <param name="Local" value="showobj-methods.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="Internal Class "Integer"">
+<param name="Local" value="Integer-class.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="Internal functions of package distr">
 <param name="Local" value="internals.html">
 </OBJECT>

Modified: pkg/distr/chm/gap-methods.html
===================================================================
--- pkg/distr/chm/gap-methods.html	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distr/chm/gap-methods.html	2008-06-17 09:51:46 UTC (rev 180)
@@ -39,7 +39,7 @@
 gaps(object)
 ## S4 method for signature 'AbscontDistribution':
 setgaps(object, exactq = 6, 
-           ngrid = 50000)
+           ngrid = 50000, ...)
 </pre>
 
 

Modified: pkg/distr/chm/internals.html
===================================================================
--- pkg/distr/chm/internals.html	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distr/chm/internals.html	2008-06-17 09:51:46 UTC (rev 180)
@@ -53,7 +53,7 @@
 <param name="keyword" value="R:   .Q2P">
 <param name="keyword" value="R:   .csimpsum">
 <param name="keyword" value="R:   .primefun">
-<param name="keyword" value="R:   coerce,numeric,Integer-method">
+<param name="keyword" value="R:   devNew">
 <param name="keyword" value=" Internal functions of package distr">
 </object>
 
@@ -94,7 +94,7 @@
 .multm(e1, e2, Dclass = "DiscreteDistribution")
 .notwithLArg(D)
 .getObjName(i = 1)
-.discretizeP(D, lower, upper, h)   
+.discretizeP(D, lower, upper, h)
 .fm(x,f)
 .fM(x,f)
 .fM2(x,f)
@@ -124,6 +124,7 @@
 .Q2P (q, ngrid = getdistrOption("DefaultNrGridPoints"))
 .csimpsum(fx)
 .primefun(f,x, nm = NULL)
+devNew(...)
 </pre>
 
 
@@ -319,6 +320,9 @@
 <tr valign="top"><td><code>nm</code></td>
 <td>
 an optional right asymptotic value</td></tr>
+<tr valign="top"><td><code>...</code></td>
+<td>
+arguments passed through to other functions</td></tr>
 </table>
 
 <h3>Details</h3>
@@ -440,7 +444,7 @@
 <code>.D2P</code> and <code>.Q2P</code> reconstruct function slot <code>p</code> from 
 from function slots  <code>d</code> resp. <code>q</code> 
 by means of function <code>.makePNew</code> and explicite numeric inversion,  
-respectively.  
+respectively.
 </p>
 <p>
 <code>.csimpsum</code> is used internally in <code>.makePNew</code> to produce
@@ -450,6 +454,10 @@
 of <code>cumsum</code>. <code>.primefun</code> is similar but more flexible and
 produces the prime function as a function.
 </p>
+<p>
+<code>devNew</code> opens a new device. This function is for back compatibility
+with R versions &lt; 2.8.0.
+</p>
 
 
 <h3>Value</h3>
@@ -550,23 +558,14 @@
 <code>.D2P, .Q2P</code>{a cdf <code>p</code> as function <code>function(q, 
             lower.tail = TRUE, log.p = FALSE)</code>}
 <code>.csimpsum</code>{a vector of evaluations of the prime function at the grid points}
-<code>.primefun</code>{the prime function as a function}</p>
+<code>.primefun</code>{the prime function as a function}
+<code>devNew</code>{returns the return value of the device opened, usually invisible 'NULL'}</p>
 
-<h3>Internal classes</h3>
-
-<p>
-For the ease of method dispatch, there is an internal
-S4 class <code>Integer</code>, which is a subclass of <code>numeric</code> and has a 
-straightforward validity method. There is a coerce method to coerce objects
-of class <code>numeric</code> to <code>Integer</code>, to be used as  
-<code>x &lt;- c(1,34,2,-3); as(x,"Integer")</code>.
-</p>
-
-
 <h3>Author(s)</h3>
 
 <p>
 Peter Ruckdeschel <a href="mailto:Peter.Ruckdeschel at itwm.fraunhofer.de">Peter.Ruckdeschel at itwm.fraunhofer.de</a>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a>
 </p>
 
 
@@ -581,6 +580,7 @@
 <code><a href="ConvPow.html">convpow</a></code>,
 <code><a href="operators-methods.html">operators</a></code>,
 <code><a href="plot-methods.html">plot-methods</a></code>
+<code><a onclick="findlink('grDevices', 'dev.new.html')" style="text-decoration: underline; color: blue; cursor: hand">dev.new</a></code>
 </p>
 
 <script Language="JScript">

Modified: pkg/distrEx/R/HellingerDist.R
===================================================================
--- pkg/distrEx/R/HellingerDist.R	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distrEx/R/HellingerDist.R	2008-06-17 09:51:46 UTC (rev 180)
@@ -6,18 +6,10 @@
                                      e2 = "AbscontDistribution"),
     function(e1, e2){
         TruncQuantile <- getdistrOption("TruncQuantile")  
-        lower1 <- ifelse(is.nan(q(e1)(0)), q(e1)(TruncQuantile), q(e1)(0))
-        upper1 <- ifelse(is.nan(q(e1)(1)), 
-                         ifelse("lower.tail" %in% names(formals(e1 at q)),
-                                q(e1)(TruncQuantile, lower.tail = FALSE),
-                                q(e1)(1-TruncQuantile)), 
-                         q(e1)(1))
-        lower2 <- ifelse(is.nan(q(e2)(0)), q(e2)(TruncQuantile), q(e2)(0))
-        upper2 <- ifelse(is.nan(q(e2)(1)), 
-                         ifelse("lower.tail" %in% names(formals(e2 at q)),
-                                q(e2)(TruncQuantile, lower.tail = FALSE),
-                                q(e2)(1-TruncQuantile)), 
-                         q(e2)(1))
+        lower1 <- getLow(e1)
+        upper1 <- getUp(e1)
+        lower2 <- getLow(e2)
+        upper2 <- getUp(e2)
         lower <- min(lower1, lower2)
         upper <- max(upper1, upper2)
 

Modified: pkg/distrEx/R/Internalfunctions.R
===================================================================
--- pkg/distrEx/R/Internalfunctions.R	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distrEx/R/Internalfunctions.R	2008-06-17 09:51:46 UTC (rev 180)
@@ -3,11 +3,13 @@
 ## discretize distributions
 .discretizeDistr <- function(D, x, lower, upper, n){
     y <- seq(from = lower, to = upper, length = n)
+    x <- x[x<=upper & x>=lower]
     supp <- y[-1]-(y[2]-y[1])/2
     prob <- diff(p(D)(y))
     prob[1] <- prob[1] + p(D)(y[1])
     prob[n-1] <- prob[n-1] + p(D)(y[n], lower = FALSE)
     ind <- sapply(x, function(x, y) which.min(abs(x-y)), y)
+    ind <- ind[ind<n]
     tab <- table(ind)
     if(any(tab > 1)){
         tab.names <- as.integer(names(tab))
@@ -16,16 +18,19 @@
         j <- 0
         for(i in tab.names){
             nr <- sum(ind == i)
-            if(nr == 1){
-                supp[i] <- x[which(ind == i)]
-            }else{
-                j.alt <- j
-                j <- j + nr
-                supp[i] <- NA
-                add.supp[(j.alt+1):j] <- x[which(ind == i)]
-                add.prob[(j.alt+1):j] <- prob[i]/nr
-                prob[i] <- NA
-            }
+            if(nr > 0)  
+              {
+               if(nr == 1){
+                     supp[i] <- x[which(ind == i)]
+               }else{
+                     j.alt <- j
+                     j <- j + nr
+                     supp[i] <- NA
+                     add.supp[(j.alt+1):j] <- x[which(ind == i)]
+                     add.prob[(j.alt+1):j] <- prob[i]/nr
+                     prob[i] <- NA
+                    }
+              }      
         }
         supp <- c(supp, add.supp)
         supp <- supp[!is.na(supp)]

Modified: pkg/distrEx/chm/00Index.html
===================================================================
--- pkg/distrEx/chm/00Index.html	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distrEx/chm/00Index.html	2008-06-17 09:51:46 UTC (rev 180)
@@ -74,6 +74,8 @@
 <td>Generic Function for Generating Convex Contaminations</td></tr>
 <tr><td width="25%"><a href="ConvexContamination.html">ConvexContamination,AbscontDistribution,UnivariateDistribution,numeric-method</a></td>
 <td>Generic Function for Generating Convex Contaminations</td></tr>
+<tr><td width="25%"><a href="ConvexContamination.html">ConvexContamination,AcDcLcDistribution,AcDcLcDistribution,numeric-method</a></td>
+<td>Generic Function for Generating Convex Contaminations</td></tr>
 <tr><td width="25%"><a href="ConvexContamination.html">ConvexContamination,DiscreteDistribution,DiscreteDistribution,numeric-method</a></td>
 <td>Generic Function for Generating Convex Contaminations</td></tr>
 <tr><td width="25%"><a href="ConvexContamination.html">ConvexContamination,UnivariateDistribution,UnivariateDistribution,numeric-method</a></td>

Modified: pkg/distrEx/chm/ConvexContamination.html
===================================================================
--- pkg/distrEx/chm/ConvexContamination.html	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distrEx/chm/ConvexContamination.html	2008-06-17 09:51:46 UTC (rev 180)
@@ -11,6 +11,7 @@
 <param name="keyword" value="R:   ConvexContamination,AbscontDistribution,AbscontDistribution,numeric-method">
 <param name="keyword" value="R:   ConvexContamination,AbscontDistribution,UnivariateDistribution,numeric-method">
 <param name="keyword" value="R:   ConvexContamination,DiscreteDistribution,DiscreteDistribution,numeric-method">
+<param name="keyword" value="R:   ConvexContamination,AcDcLcDistribution,AcDcLcDistribution,numeric-method">
 <param name="keyword" value=" Generic Function for Generating Convex Contaminations">
 </object>
 
@@ -65,6 +66,10 @@
 
 
 <dt>e1 = "DiscreteDistribution", e2 = "DiscreteDistribution", size = "numeric":</dt><dd>convex combination of two discrete univariate distributions </dd>
+
+
+<dt>e1 = "AcDcLcDistribution", e2 = "AcDcLcDistribution", size = "numeric":</dt><dd>convex combination of two univariate distributions which may be coerced to
+<code>"UnivarLebDecDistribution"</code>.</dd>
 </dl>
 
 <h3>Author(s)</h3>

Modified: pkg/distrEx/chm/E.html
===================================================================
--- pkg/distrEx/chm/E.html	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distrEx/chm/E.html	2008-06-17 09:51:46 UTC (rev 180)
@@ -16,14 +16,19 @@
 <param name="keyword" value="R:   E,AffLinLatticeDistribution,missing,missing-method">
 <param name="keyword" value="R:   E,MultivariateDistribution,missing,missing-method">
 <param name="keyword" value="R:   E,DiscreteMVDistribution,missing,missing-method">
+<param name="keyword" value="R:   E,UnivarLebDecDistribution,missing,missing-method">
+<param name="keyword" value="R:   E,AffLinUnivarLebDecDistribution,missing,missing-method">
 <param name="keyword" value="R:   E,UnivariateDistribution,function,missing-method">
 <param name="keyword" value="R:   E,AbscontDistribution,function,missing-method">
 <param name="keyword" value="R:   E,DiscreteDistribution,function,missing-method">
 <param name="keyword" value="R:   E,MultivariateDistribution,function,missing-method">
 <param name="keyword" value="R:   E,DiscreteMVDistribution,function,missing-method">
+<param name="keyword" value="R:   E,UnivarLebDecDistribution,function,missing-method">
 <param name="keyword" value="R:   E,UnivariateCondDistribution,missing,numeric-method">
 <param name="keyword" value="R:   E,AbscontCondDistribution,missing,numeric-method">
 <param name="keyword" value="R:   E,DiscreteCondDistribution,missing,numeric-method">
+<param name="keyword" value="R:   E,UnivarLebDecDistribution,missing,ANY-method">
+<param name="keyword" value="R:   E,UnivarLebDecDistribution,function,ANY-method">
 <param name="keyword" value="R:   E,UnivariateCondDistribution,function,numeric-method">
 <param name="keyword" value="R:   E,AbscontCondDistribution,function,numeric-method">
 <param name="keyword" value="R:   E,DiscreteCondDistribution,function,numeric-method">
@@ -79,8 +84,12 @@
 
 ## S4 method for signature 'AffLinDistribution, missing,
 ##   missing':
-E(object)
+E(object, fun, cond)
 
+## S4 method for signature 'AffLinUnivarLebDecDistribution,
+##   missing, missing':
+E(object, fun, cond)
+
 ## S4 method for signature 'MultivariateDistribution,
 ##   function, missing':
 E(object, fun, cond, useApply = TRUE, ...)
@@ -91,11 +100,11 @@
 
 ## S4 method for signature 'AbscontCondDistribution,
 ##   missing, numeric':
-E(object, cond, useApply = TRUE)
+E(object, fun, cond, useApply = TRUE)
 
 ## S4 method for signature 'DiscreteCondDistribution,
 ##   missing, numeric':
-E(object, cond, useApply = TRUE)
+E(object, fun, cond, useApply = TRUE)
 
 ## S4 method for signature 'UnivariateCondDistribution,
 ##   function, numeric':
@@ -215,10 +224,27 @@
 on <code>support</code> and <code>sum</code>.</dd>
 
 
+<dt>object = "UnivariateDistribution", fun = "missing", cond = "missing":</dt><dd>expectation of univariate Lebesgue decomposed distributions
+by separate calculations for discrete and absolutely continuous part. </dd>
+
+
+<dt>object = "AffLinDistribution", fun = "missing", cond = "missing":</dt><dd>expectation of an affine linear transformation <i>aX+b</i> as
+<i>a E[X]+b</i> for <code>X</code> either <code>"DiscreteDistribution"</code>
+or <code>"AbscontDistribution"</code>.
+</dd>
+<dt>object = "AffLinUnivarLebDecDistribution", fun = "missing", cond = "missing":</dt><dd>expectation of an affine linear transformation <i>aX+b</i> as
+<i>a E[X]+b</i> for <code>X</code> either <code>"UnivarLebDecDistribution"</code>.
+</dd>
+
+
 <dt>object = "UnivariateDistribution", fun = "function", cond = "missing":</dt><dd>expectation of <code>fun</code> under univariate distributions using 
 crude Monte-Carlo integration. </dd>
 
 
+<dt>object = "UnivariateDistribution", fun = "function", cond = "missing":</dt><dd>expectation of <code>fun</code> under univariate Lebesgue decomposed distributions
+by separate calculations for discrete and absolutely continuous part. </dd>
+
+
 <dt>object = "AbscontDistribution", fun = "function", cond = "missing":</dt><dd>expectation of <code>fun</code> under absolutely continuous 
 univariate distributions using <code>distrExIntegrate</code>. </dd>
 
@@ -286,7 +312,7 @@
 <h3>Author(s)</h3>
 
 <p>
-Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a> and Peter Ruckdeschel <a href="mailto:Peter.Ruckdeschel at itwm.fraunhofer.de">Peter.Ruckdeschel at itwm.fraunhofer.de</a>
+Matthias Kohl <a href="mailto:Matthias.Kohl at stamats.de">Matthias.Kohl at stamats.de</a> and Peter Ruckdeschel <a href="mailto:peter.ruckdeschel at uni-bayreuth.de">peter.ruckdeschel at uni-bayreuth.de</a>
 </p>
 
 
@@ -329,6 +355,11 @@
 E(Norm(mean=1), fun = function(x){x^2})
 E(D1, function(x, cond){cond*x^2}, cond = 2, withCond = TRUE, useApply = FALSE)
 E(Norm(mean=2), function(x){2*x^2})
+
+# some Lebesgue decomposed distribution 
+mymix &lt;- UnivarLebDecDistribution(acPart = Norm(), discretePart = Binom(4,.4),
+         acWeight = 0.4)
+E(mymix)
 </pre>
 
 <script Language="JScript">

Modified: pkg/distrEx/chm/HellingerDist.html
===================================================================
--- pkg/distrEx/chm/HellingerDist.html	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distrEx/chm/HellingerDist.html	2008-06-17 09:51:46 UTC (rev 180)
@@ -15,6 +15,7 @@
 <param name="keyword" value="R:   HellingerDist,DiscreteDistribution,numeric-method">
 <param name="keyword" value="R:   HellingerDist,numeric,AbscontDistribution-method">
 <param name="keyword" value="R:   HellingerDist,AbscontDistribution,numeric-method">
+<param name="keyword" value="R:   HellingerDist,AcDcLcDistribution,AcDcLcDistribution-method">
 <param name="keyword" value=" Generic function for the computation of the Hellinger distance of two distributions">
 </object>
 
@@ -56,12 +57,15 @@
 HellingerDist(e1, e2)
 ## S4 method for signature 'numeric, AbscontDistribution':
 HellingerDist(e1, e2, asis.smooth.discretize = "discretize", 
-            n.discr = getdistrModOption("nDiscretize"), low.discr = getLow(e2),
-            up.discr = getUp(e2), h.smooth = getdistrModOption("hSmooth"))
+            n.discr = getdistrExOption("nDiscretize"), low.discr = getLow(e2),
+            up.discr = getUp(e2), h.smooth = getdistrExOption("hSmooth"))
 ## S4 method for signature 'AbscontDistribution, numeric':
 HellingerDist(e1, e2, asis.smooth.discretize = "discretize", 
-            n.discr = getdistrModOption("nDiscretize"), low.discr = getLow(e2),
-            up.discr = getUp(e2), h.smooth = getdistrModOption("hSmooth"))
+            n.discr = getdistrExOption("nDiscretize"), low.discr = getLow(e1),
+            up.discr = getUp(e1), h.smooth = getdistrExOption("hSmooth"))
+## S4 method for signature 'AcDcLcDistribution,
+##   AcDcLcDistribution':
+HellingerDist(e1,e2)
 </pre>
 
 
@@ -160,6 +164,9 @@
 <dt>e1 = "AbscontDistribution", e1 = "numeric":</dt><dd>Hellinger distance between (empirical) data and an abs. cont. 
 distribution.
 </dd>
+<dt>e1 = "AcDcLcDistribution", e2 = "AcDcLcDistribution":</dt><dd><br>Hellinger distance of mixed discrete and absolutely continuous 
+univariate distributions.
+</dd>
 </dl>
 
 <h3>Author(s)</h3>

Modified: pkg/distrEx/chm/TotalVarDist.html
===================================================================
--- pkg/distrEx/chm/TotalVarDist.html	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distrEx/chm/TotalVarDist.html	2008-06-17 09:51:46 UTC (rev 180)
@@ -55,12 +55,12 @@
 TotalVarDist(e1, e2)
 ## S4 method for signature 'numeric, AbscontDistribution':
 TotalVarDist(e1, e2, asis.smooth.discretize = "discretize", 
-            n.discr = getdistrModOption("nDiscretize"), low.discr = getLow(e2),
-            up.discr = getUp(e2), h.smooth = getdistrModOption("hSmooth"))
+            n.discr = getdistrExOption("nDiscretize"), low.discr = getLow(e2),
+            up.discr = getUp(e2), h.smooth = getdistrExOption("hSmooth"))
 ## S4 method for signature 'AbscontDistribution, numeric':
 TotalVarDist(e1, e2, asis.smooth.discretize = "discretize", 
-            n.discr = getdistrModOption("nDiscretize"), low.discr = getLow(e2),
-            up.discr = getUp(e2), h.smooth = getdistrModOption("hSmooth"))
+            n.discr = getdistrExOption("nDiscretize"), low.discr = getLow(e1),
+            up.discr = getUp(e1), h.smooth = getdistrExOption("hSmooth"))
 ## S4 method for signature 'AcDcLcDistribution,
 ##   AcDcLcDistribution':
 TotalVarDist(e1, e2)

Modified: pkg/distrEx/chm/Var.html
===================================================================
--- pkg/distrEx/chm/Var.html	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distrEx/chm/Var.html	2008-06-17 09:51:46 UTC (rev 180)
@@ -241,43 +241,43 @@
 ## S4 method for signature 'AffLinDistribution':
 var(x, fun, cond, withCond, useApply, ...)
 ## S4 method for signature 'Binom':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Beta':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Cauchy':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Chisq':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Dirac':
-var(x)
+var(x, ...)
 ## S4 method for signature 'DExp':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Exp':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Fd':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Gammad':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Geom':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Hyper':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Logis':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Lnorm':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Nbinom':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Norm':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Pois':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Td':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Unif':
-var(x)
+var(x, ...)
 ## S4 method for signature 'Weibull':
-var(x)
+var(x, ...)
 
 skewness(x, ...)
 ## S4 method for signature 'UnivariateDistribution':
@@ -285,43 +285,43 @@
 ## S4 method for signature 'AffLinDistribution':
 skewness(x, fun, cond, withCond, useApply, ...)
 ## S4 method for signature 'Binom':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Beta':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Cauchy':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Chisq':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Dirac':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'DExp':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Exp':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Fd':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Gammad':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Geom':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Hyper':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Logis':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Lnorm':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Nbinom':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Norm':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Pois':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Td':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Unif':
-skewness(x)
+skewness(x, ...)
 ## S4 method for signature 'Weibull':
-skewness(x)
+skewness(x, ...)
 
 kurtosis(x, ...)
 ## S4 method for signature 'UnivariateDistribution':
@@ -329,43 +329,43 @@
 ## S4 method for signature 'AffLinDistribution':
 kurtosis(x, fun, cond, withCond, useApply, ...)
 ## S4 method for signature 'Binom':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Beta':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Cauchy':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Chisq':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Dirac':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'DExp':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Exp':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Fd':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Gammad':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Geom':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Hyper':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Logis':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Lnorm':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Nbinom':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Norm':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Pois':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Td':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Unif':
-kurtosis(x)
+kurtosis(x, ...)
 ## S4 method for signature 'Weibull':
-kurtosis(x)
+kurtosis(x, ...)
 </pre>
 
 

Modified: pkg/distrEx/chm/distrEx.chm
===================================================================
(Binary files differ)

Modified: pkg/distrEx/chm/distrEx.toc
===================================================================
--- pkg/distrEx/chm/distrEx.toc	2008-06-16 09:21:37 UTC (rev 179)
+++ pkg/distrEx/chm/distrEx.toc	2008-06-17 09:51:46 UTC (rev 180)
@@ -62,6 +62,10 @@
 <param name="Local" value="ConvexContamination.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="ConvexContamination,AcDcLcDistribution,AcDcLcDistribution,numeric-method">
+<param name="Local" value="ConvexContamination.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="ConvexContamination,DiscreteDistribution,DiscreteDistribution,numeric-method">
 <param name="Local" value="ConvexContamination.html">
 </OBJECT>

Modified: pkg/distrEx/src/distrEx.dll
===================================================================
(Binary files differ)



More information about the Distr-commits mailing list