[Distr-commits] r454 - branches/distr-2.2/pkg/distrEx/R branches/distr-2.2/pkg/distrEx/man pkg/distrEx/R pkg/distrEx/chm pkg/distrEx/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 9 14:06:04 CEST 2009


Author: ruckdeschel
Date: 2009-04-09 14:06:04 +0200 (Thu, 09 Apr 2009)
New Revision: 454

Modified:
   branches/distr-2.2/pkg/distrEx/R/ClippedMoments.R
   branches/distr-2.2/pkg/distrEx/man/m1df.Rd
   branches/distr-2.2/pkg/distrEx/man/m2df.Rd
   pkg/distrEx/R/ClippedMoments.R
   pkg/distrEx/chm/00Index.html
   pkg/distrEx/chm/E.html
   pkg/distrEx/chm/distrEx.chm
   pkg/distrEx/chm/distrEx.toc
   pkg/distrEx/chm/m1df.html
   pkg/distrEx/chm/m2df.html
   pkg/distrEx/man/m1df.Rd
   pkg/distrEx/man/m2df.Rd
Log:
bug - fixing is time consuming!!!

-fixed some --hard-to-detect/localize--  bug induced with lazy evaluation:
 Data-Examples in scripts to ROptEst threw errors: reason --- need an
 explicit assignment im ClippedMomemts.R (distrEx) mc$object <- object
 to force evaluation of object (otherwise only transmitted as name...)
-In addition new/revised[corrected!] methods for m1df, m2df for 
 AfflinDistribution  

Modified: branches/distr-2.2/pkg/distrEx/R/ClippedMoments.R
===================================================================
--- branches/distr-2.2/pkg/distrEx/R/ClippedMoments.R	2009-04-08 10:44:33 UTC (rev 453)
+++ branches/distr-2.2/pkg/distrEx/R/ClippedMoments.R	2009-04-09 12:06:04 UTC (rev 454)
@@ -1,29 +1,48 @@
 ###############################################################################
 ## Clipped first and second moments
 ###############################################################################
+.inArgs <- distr:::.inArgs
+
 setMethod("m1df", "UnivariateDistribution",
     function(object, upper, ... ){
-        return(E(object, upp=upper, ...))
+        mc <- match.call()
+        mc <- as.list(mc)[-1]
+        mc$upper <- NULL
+        mc$upp <- upper
+        mc$useApply <- FALSE
+        mc$object <- object
+        return(do.call("E", args=mc ))
     })
 setMethod("m2df", "UnivariateDistribution",
     function(object, upper, ...){
         mc <- match.call()
         mc <- as.list(mc)[-1]
         mc1 <- mc        
-        fun0 <- if(is.null(mc$fun)) 
-                   function(x)x^2 else function(x) (eval(mc1$fun)(x))^2
+        fun0 <- function(x)x^2  
+        if(!is.null(mc$fun)){
+            fun0 <- function(x){}
+            body(fun0) <- substitute({fun2(x)^2}, list(fun2=eval(mc$fun)))
+        }
         mc$fun <- fun0
         mc$upper <- NULL
         mc$upp <- upper
+        mc$useApply <- FALSE
+        mc$object <- object
         return(do.call("E", args=mc ))
     })
 setMethod("m1df", "AbscontDistribution",
     function(object, upper, 
              lowerTruncQuantile = getdistrExOption("m1dfLowerTruncQuantile"),
              rel.tol = getdistrExOption("m1dfRelativeTolerance"), ... ){
-        return(E(object, upp=upper, lowerTruncQuantile = lowerTruncQuantile, 
-                 rel.tol = rel.tol, ...))
-    })
+        mc <- match.call()
+        mc <- as.list(mc)[-1]
+        mc$useApply <- FALSE
+        mc$upper <- NULL
+        mc$object <- object
+        mc$lowerTruncQuantile <- lowerTruncQuantile
+        mc$rel.tol <- rel.tol
+        return(do.call("E", args=mc ))
+      })
 setMethod("m2df", "AbscontDistribution",
     function(object, upper, 
              lowerTruncQuantile = getdistrExOption("m2dfLowerTruncQuantile"),
@@ -31,13 +50,18 @@
         mc <- match.call()
         mc <- as.list(mc)[-1]
         mc1 <- mc        
-        fun0 <- if(is.null(mc$fun)) 
-                   function(x)x^2 else function(x) (eval(mc1$fun)(x))^2
+        fun0 <- function(x)x^2  
+        if(!is.null(mc$fun)){
+            fun0 <- function(x){}
+            body(fun0) <- substitute({fun2(x)^2}, list(fun2=eval(mc$fun)))
+        }
         mc$fun <- fun0
         mc$upper <- NULL
         mc$upp <- upper
         mc$lowerTruncQuantile <- lowerTruncQuantile
         mc$rel.tol <- rel.tol
+        mc$object <- object
+        mc$useApply <- FALSE
         return(do.call("E", args=mc ))
     })
 #setMethod("m1df", "AbscontDistribution",
@@ -210,21 +234,71 @@
         mc <- match.call()
         mc <- as.list(mc)[-1]
         mc1 <- mc        
-        fun0 <- if(is.null(mc$fun)) 
-                   function(x)x^2 else function(x) (eval(mc1$fun)(x))^2
+        fun0 <- function(x)x^2  
+        if(!is.null(mc$fun)){
+            fun0 <- function(x){}
+            body(fun0) <- substitute({fun2(x)^2}, list(fun2=eval(mc$fun)))
+        }
         mc$fun <- fun0
         mc$upper <- NULL
         mc$upp <- upper
         mc$object <- as(object, "DiscreteDistribution")
+        mc$useApply <- FALSE
         return(do.call("E", args=mc ))
     })
 
 setMethod("m1df", "AffLinDistribution", 
     function(object, upper, ...){
-             a <- object at a
-             b <- object at b
-             if(a>0)
-                a * m1df(object at X0,(upper-b)/a) + b
-             else   
-                (-a) * m1df(-object at X0,(upper-b)/(-a)) + b
+        mc <- match.call()
+        mc <- as.list(mc)[-1]
+        a <- object at a
+        b <- object at b
+        u <- (upper-b)/a
+        mc1 <- mc
+        if(!is.null(mc$fun)){
+            mc1$fun <- function(x) eval(mc$fun( a*x+b))
+            mc1$upp <- u
+            mc1$upper <- NULL
+            mc1$useApply <- FALSE
+            mc1$object <- object
+            return(do.call("E", args=mc1 ))
+            }
+        if(.inArgs("lower.tail", p(object at X0)))
+             pl <-   function(u)  p.l(object at X0)(u, lower.tail = FALSE)
+        else pl <-   function(u)  1-p.l(object at X0)(u)
+        eadd <- if(a>0) m1df(object at X0, u)
+                else    m1df(object at X0, Inf) - m1df(object at X0, u, ...)
+        padd <- if(a>0) p(object at X0)(u)
+                else    pl(u)
+        return(a * eadd + b * padd)
     })
+
+setMethod("m2df", "AffLinDistribution", 
+    function(object, upper, ...){
+        mc <- match.call()
+        mc <- as.list(mc)[-1]
+        a <- object at a
+        b <- object at b
+        u <- (upper-b)/a
+        mc1 <- mc
+        if(!is.null(mc$fun)){
+            fun0 <- function(x){}
+            body(fun0) <- substitute({fun2(x)^2}, list(fun2=eval(mc$fun)))
+            mc1$fun <- fun0
+            mc1$upp <- u
+            mc1$upper <- NULL
+            mc1$useApply <- FALSE
+            mc1$object <- object
+            return(do.call("E", args=mc1 ))
+            }
+        if(.inArgs("lower.tail", p(object at X0)))
+             pl <-   function(u)  p.l(object at X0)(u, lower.tail = FALSE)
+        else pl <-   function(u)  1-p.l(object at X0)(u)
+        vadd <- if(a>0) m2df(object at X0, u)
+                else    m2df(object at X0, Inf, ...) - m2df(object at X0, u, ...)
+        eadd <- if(a>0) m1df(object at X0, u)
+                else    m1df(object at X0, Inf, ...) - m1df(object at X0, u, ...)
+        padd <- if(a>0) p(object at X0)(u)
+                else    pl(u)
+        return(a^2 * vadd + 2 * a * b * eadd + b^2 * padd)
+    })

Modified: branches/distr-2.2/pkg/distrEx/man/m1df.Rd
===================================================================
--- branches/distr-2.2/pkg/distrEx/man/m1df.Rd	2009-04-08 10:44:33 UTC (rev 453)
+++ branches/distr-2.2/pkg/distrEx/man/m1df.Rd	2009-04-09 12:06:04 UTC (rev 454)
@@ -3,7 +3,6 @@
 \alias{m1df-methods}
 \alias{m1df,UnivariateDistribution-method}
 \alias{m1df,AbscontDistribution-method}
-%\alias{m1df,DiscreteDistribution-method}
 \alias{m1df,LatticeDistribution-method}
 \alias{m1df,AffLinDistribution-method}
 \alias{m1df,Binom-method}
@@ -44,6 +43,18 @@
    uses call \code{E(object, upp=upper, ...)}.
    }
 
+  \item{object = "AbscontDistribution":}{ clipped first moment
+    for absolutely continuous univariate distributions which is 
+    computed using \code{integrate}. }
+
+  \item{object = "LatticeDistribution":}{ clipped first moment
+    for discrete univariate distributions which is computed 
+    using \code{support} and \code{sum}. }
+
+  \item{object = "AffLinDistribution":}{ clipped first moment
+    for affine linear distributions  which is computed on basis of 
+    slot \code{X0}. }
+
 %  \item{object = "AbscontDistribution":}{ clipped first moment
 %    for absolutely continuous univariate distributions which 
 %    is computed using \code{distrExIntegrate}. }

Modified: branches/distr-2.2/pkg/distrEx/man/m2df.Rd
===================================================================
--- branches/distr-2.2/pkg/distrEx/man/m2df.Rd	2009-04-08 10:44:33 UTC (rev 453)
+++ branches/distr-2.2/pkg/distrEx/man/m2df.Rd	2009-04-09 12:06:04 UTC (rev 454)
@@ -5,6 +5,7 @@
 \alias{m2df,AbscontDistribution-method}
 %\alias{m2df,DiscreteDistribution-method}
 \alias{m2df,LatticeDistribution-method}
+\alias{m2df,AffLinDistribution-method}
 \alias{m2df,Binom-method}
 \alias{m2df,Pois-method}
 \alias{m2df,Norm-method}
@@ -36,6 +37,7 @@
 }
 \section{Methods}{
 \describe{
+
   \item{object = "UnivariateDistribution":}{ %
     %clipped first moment
     %for univariate distributions which is computed using 
@@ -43,27 +45,31 @@
      uses call \code{E(object, upp=upper, fun = function, ...)}.
     }
 
-  \item{object = "AbscontDistribution":}{ clipped first moment
+  \item{object = "AbscontDistribution":}{ clipped second moment
     for absolutely continuous univariate distributions which is 
     computed using \code{integrate}. }
 
-  \item{object = "DiscreteDistribution":}{ clipped first moment
+  \item{object = "LatticeDistribution":}{ clipped second moment
     for discrete univariate distributions which is computed 
     using \code{support} and \code{sum}. }
 
-  \item{object = "Binom":}{ clipped first moment
+  \item{object = "AffLinDistribution":}{ clipped second moment
+    for affine linear distributions  which is computed on basis of 
+    slot \code{X0}. }
+
+  \item{object = "Binom":}{ clipped second moment
     for Binomial distributions which is computed using \code{pbinom}. }
 
-  \item{object = "Pois":}{ clipped first moment
+  \item{object = "Pois":}{ clipped second moment
     for Poisson distributions which is computed using \code{ppois}. }
 
-  \item{object = "Norm":}{ clipped first moment
+  \item{object = "Norm":}{ clipped second moment
     for normal distributions which is computed using \code{dnorm} and \code{pnorm}. }
 
-  \item{object = "Exp":}{ clipped first moment
+  \item{object = "Exp":}{ clipped second moment
     for exponential distributions which is computed using \code{pexp}. }
 
-  \item{object = "Chisq":}{ clipped first moment
+  \item{object = "Chisq":}{ clipped second moment
     for \eqn{\chi^2}{Chi^2} distributions which is computed using \code{pchisq}. }
 }}
 %\references{ ~put references to the literature/web site here ~ }

Modified: pkg/distrEx/R/ClippedMoments.R
===================================================================
--- pkg/distrEx/R/ClippedMoments.R	2009-04-08 10:44:33 UTC (rev 453)
+++ pkg/distrEx/R/ClippedMoments.R	2009-04-09 12:06:04 UTC (rev 454)
@@ -1,29 +1,48 @@
 ###############################################################################
 ## Clipped first and second moments
 ###############################################################################
+.inArgs <- distr:::.inArgs
+
 setMethod("m1df", "UnivariateDistribution",
     function(object, upper, ... ){
-        return(E(object, upp=upper, ...))
+        mc <- match.call()
+        mc <- as.list(mc)[-1]
+        mc$upper <- NULL
+        mc$upp <- upper
+        mc$useApply <- FALSE
+        mc$object <- object
+        return(do.call("E", args=mc ))
     })
 setMethod("m2df", "UnivariateDistribution",
     function(object, upper, ...){
         mc <- match.call()
         mc <- as.list(mc)[-1]
         mc1 <- mc        
-        fun0 <- if(is.null(mc$fun)) 
-                   function(x)x^2 else function(x) (eval(mc1$fun)(x))^2
+        fun0 <- function(x)x^2  
+        if(!is.null(mc$fun)){
+            fun0 <- function(x){}
+            body(fun0) <- substitute({fun2(x)^2}, list(fun2=eval(mc$fun)))
+        }
         mc$fun <- fun0
         mc$upper <- NULL
         mc$upp <- upper
+        mc$useApply <- FALSE
+        mc$object <- object
         return(do.call("E", args=mc ))
     })
 setMethod("m1df", "AbscontDistribution",
     function(object, upper, 
              lowerTruncQuantile = getdistrExOption("m1dfLowerTruncQuantile"),
              rel.tol = getdistrExOption("m1dfRelativeTolerance"), ... ){
-        return(E(object, upp=upper, lowerTruncQuantile = lowerTruncQuantile, 
-                 rel.tol = rel.tol, ...))
-    })
+        mc <- match.call()
+        mc <- as.list(mc)[-1]
+        mc$useApply <- FALSE
+        mc$upper <- NULL
+        mc$object <- object
+        mc$lowerTruncQuantile <- lowerTruncQuantile
+        mc$rel.tol <- rel.tol
+        return(do.call("E", args=mc ))
+      })
 setMethod("m2df", "AbscontDistribution",
     function(object, upper, 
              lowerTruncQuantile = getdistrExOption("m2dfLowerTruncQuantile"),
@@ -31,13 +50,18 @@
         mc <- match.call()
         mc <- as.list(mc)[-1]
         mc1 <- mc        
-        fun0 <- if(is.null(mc$fun)) 
-                   function(x)x^2 else function(x) (eval(mc1$fun)(x))^2
+        fun0 <- function(x)x^2  
+        if(!is.null(mc$fun)){
+            fun0 <- function(x){}
+            body(fun0) <- substitute({fun2(x)^2}, list(fun2=eval(mc$fun)))
+        }
         mc$fun <- fun0
         mc$upper <- NULL
         mc$upp <- upper
         mc$lowerTruncQuantile <- lowerTruncQuantile
         mc$rel.tol <- rel.tol
+        mc$object <- object
+        mc$useApply <- FALSE
         return(do.call("E", args=mc ))
     })
 #setMethod("m1df", "AbscontDistribution",
@@ -210,21 +234,71 @@
         mc <- match.call()
         mc <- as.list(mc)[-1]
         mc1 <- mc        
-        fun0 <- if(is.null(mc$fun)) 
-                   function(x)x^2 else function(x) (eval(mc1$fun)(x))^2
+        fun0 <- function(x)x^2  
+        if(!is.null(mc$fun)){
+            fun0 <- function(x){}
+            body(fun0) <- substitute({fun2(x)^2}, list(fun2=eval(mc$fun)))
+        }
         mc$fun <- fun0
         mc$upper <- NULL
         mc$upp <- upper
         mc$object <- as(object, "DiscreteDistribution")
+        mc$useApply <- FALSE
         return(do.call("E", args=mc ))
     })
 
 setMethod("m1df", "AffLinDistribution", 
     function(object, upper, ...){
-             a <- object at a
-             b <- object at b
-             if(a>0)
-                a * m1df(object at X0,(upper-b)/a) + b
-             else   
-                (-a) * m1df(-object at X0,(upper-b)/(-a)) + b
+        mc <- match.call()
+        mc <- as.list(mc)[-1]
+        a <- object at a
+        b <- object at b
+        u <- (upper-b)/a
+        mc1 <- mc
+        if(!is.null(mc$fun)){
+            mc1$fun <- function(x) eval(mc$fun( a*x+b))
+            mc1$upp <- u
+            mc1$upper <- NULL
+            mc1$useApply <- FALSE
+            mc1$object <- object
+            return(do.call("E", args=mc1 ))
+            }
+        if(.inArgs("lower.tail", p(object at X0)))
+             pl <-   function(u)  p.l(object at X0)(u, lower.tail = FALSE)
+        else pl <-   function(u)  1-p.l(object at X0)(u)
+        eadd <- if(a>0) m1df(object at X0, u)
+                else    m1df(object at X0, Inf) - m1df(object at X0, u, ...)
+        padd <- if(a>0) p(object at X0)(u)
+                else    pl(u)
+        return(a * eadd + b * padd)
     })
+
+setMethod("m2df", "AffLinDistribution", 
+    function(object, upper, ...){
+        mc <- match.call()
+        mc <- as.list(mc)[-1]
+        a <- object at a
+        b <- object at b
+        u <- (upper-b)/a
+        mc1 <- mc
+        if(!is.null(mc$fun)){
+            fun0 <- function(x){}
+            body(fun0) <- substitute({fun2(x)^2}, list(fun2=eval(mc$fun)))
+            mc1$fun <- fun0
+            mc1$upp <- u
+            mc1$upper <- NULL
+            mc1$useApply <- FALSE
+            mc1$object <- object
+            return(do.call("E", args=mc1 ))
+            }
+        if(.inArgs("lower.tail", p(object at X0)))
+             pl <-   function(u)  p.l(object at X0)(u, lower.tail = FALSE)
+        else pl <-   function(u)  1-p.l(object at X0)(u)
+        vadd <- if(a>0) m2df(object at X0, u)
+                else    m2df(object at X0, Inf, ...) - m2df(object at X0, u, ...)
+        eadd <- if(a>0) m1df(object at X0, u)
+                else    m1df(object at X0, Inf, ...) - m1df(object at X0, u, ...)
+        padd <- if(a>0) p(object at X0)(u)
+                else    pl(u)
+        return(a^2 * vadd + 2 * a * b * eadd + b^2 * padd)
+    })

Modified: pkg/distrEx/chm/00Index.html
===================================================================
--- pkg/distrEx/chm/00Index.html	2009-04-08 10:44:33 UTC (rev 453)
+++ pkg/distrEx/chm/00Index.html	2009-04-09 12:06:04 UTC (rev 454)
@@ -550,6 +550,8 @@
 <td>Generic function for the computation of clipped second moments</td></tr>
 <tr><td width="25%"><a href="m2df.html">m2df,AbscontDistribution-method</a></td>
 <td>Generic function for the computation of clipped second moments</td></tr>
+<tr><td width="25%"><a href="m2df.html">m2df,AffLinDistribution-method</a></td>
+<td>Generic function for the computation of clipped second moments</td></tr>
 <tr><td width="25%"><a href="m2df.html">m2df,Binom-method</a></td>
 <td>Generic function for the computation of clipped second moments</td></tr>
 <tr><td width="25%"><a href="m2df.html">m2df,Chisq-method</a></td>

Modified: pkg/distrEx/chm/E.html
===================================================================
--- pkg/distrEx/chm/E.html	2009-04-08 10:44:33 UTC (rev 453)
+++ pkg/distrEx/chm/E.html	2009-04-09 12:06:04 UTC (rev 454)
@@ -120,7 +120,7 @@
 
 ## S4 method for signature 'DiscreteMVDistribution,
 ##   missing, missing':
-E(object, useApply = TRUE, ...)
+E(object, low = NULL, upp = NULL, ...)
 
 ## S4 method for signature 'DiscreteMVDistribution,
 ##   function, missing':
@@ -134,12 +134,12 @@
              rel.tol= getdistrExOption("ErelativeTolerance"), 
              lowerTruncQuantile = getdistrExOption("ElowerTruncQuantile"), 
              upperTruncQuantile = getdistrExOption("EupperTruncQuantile"), 
-             IQR.fac = getdistrExOption("IQR.fac"), low = NULL, upp = NULL, ...)
+             IQR.fac = getdistrExOption("IQR.fac"), ...)
 
 ## S4 method for signature 'DiscreteCondDistribution,
 ##   missing, numeric':
 E(object, cond, useApply = TRUE,
-             low, upp)
+             low = NULL, upp = NULL, ...)
 
 ## S4 method for signature 'UnivariateCondDistribution,
 ##   function, numeric':
@@ -501,6 +501,22 @@
 E(D1, function(x, cond){cond*x^2}, cond = 2, withCond = TRUE, useApply = FALSE)
 E(Norm(mean=2), function(x){2*x^2})
 
+E(as(Norm(mean=2),"AbscontDistribution"))
+### somewhat less accurate:
+E(as(Norm(mean=2),"AbscontDistribution"), 
+     lowerTruncQuantil=1e-4,upperTruncQuantil=1e-4, IQR.fac= 4)
+### even less accurate:
+E(as(Norm(mean=2),"AbscontDistribution"), 
+     lowerTruncQuantil=1e-2,upperTruncQuantil=1e-2, IQR.fac= 4)
+### no good idea, but just as an example:
+E(as(Norm(mean=2),"AbscontDistribution"), 
+     lowerTruncQuantil=1e-2,upperTruncQuantil=1e-2, IQR.fac= .1)
+
+### truncation of integration range; see also m1df...
+E(Norm(mean=2), low=2,upp=4)
+
+E(Cauchy())
+E(Cauchy(),upp=3,low=-2)
 # some Lebesgue decomposed distribution 
 mymix &lt;- UnivarLebDecDistribution(acPart = Norm(), discretePart = Binom(4,.4),
          acWeight = 0.4)

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

Modified: pkg/distrEx/chm/distrEx.toc
===================================================================
--- pkg/distrEx/chm/distrEx.toc	2009-04-08 10:44:33 UTC (rev 453)
+++ pkg/distrEx/chm/distrEx.toc	2009-04-09 12:06:04 UTC (rev 454)
@@ -922,6 +922,10 @@
 <param name="Local" value="m2df.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="m2df,AffLinDistribution-method">
+<param name="Local" value="m2df.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="m2df,Binom-method">
 <param name="Local" value="m2df.html">
 </OBJECT>

Modified: pkg/distrEx/chm/m1df.html
===================================================================
--- pkg/distrEx/chm/m1df.html	2009-04-08 10:44:33 UTC (rev 453)
+++ pkg/distrEx/chm/m1df.html	2009-04-09 12:06:04 UTC (rev 454)
@@ -82,6 +82,21 @@
 </dd>
 
 
+<dt>object = "AbscontDistribution":</dt><dd>clipped first moment
+for absolutely continuous univariate distributions which is 
+computed using <code>integrate</code>. </dd>
+
+
+<dt>object = "LatticeDistribution":</dt><dd>clipped first moment
+for discrete univariate distributions which is computed 
+using <code>support</code> and <code>sum</code>. </dd>
+
+
+<dt>object = "AffLinDistribution":</dt><dd>clipped first moment
+for affine linear distributions  which is computed on basis of 
+slot <code>X0</code>. </dd>
+
+
 <dt>object = "Binom":</dt><dd>clipped first moment
 for Binomial distributions which is computed using <code>pbinom</code>. </dd>
 

Modified: pkg/distrEx/chm/m2df.html
===================================================================
--- pkg/distrEx/chm/m2df.html	2009-04-08 10:44:33 UTC (rev 453)
+++ pkg/distrEx/chm/m2df.html	2009-04-09 12:06:04 UTC (rev 454)
@@ -10,6 +10,7 @@
 <param name="keyword" value="R:   m2df,UnivariateDistribution-method">
 <param name="keyword" value="R:   m2df,AbscontDistribution-method">
 <param name="keyword" value="R:   m2df,LatticeDistribution-method">
+<param name="keyword" value="R:   m2df,AffLinDistribution-method">
 <param name="keyword" value="R:   m2df,Binom-method">
 <param name="keyword" value="R:   m2df,Pois-method">
 <param name="keyword" value="R:   m2df,Norm-method">
@@ -77,37 +78,44 @@
 <h3>Methods</h3>
 
 <dl>
+</p>
+
 <dt>object = "UnivariateDistribution":</dt><dd>uses call <code>E(object, upp=upper, fun = function, ...)</code>.
 </dd>
 
 
-<dt>object = "AbscontDistribution":</dt><dd>clipped first moment
+<dt>object = "AbscontDistribution":</dt><dd>clipped second moment
 for absolutely continuous univariate distributions which is 
 computed using <code>integrate</code>. </dd>
 
 
-<dt>object = "DiscreteDistribution":</dt><dd>clipped first moment
+<dt>object = "LatticeDistribution":</dt><dd>clipped second moment
 for discrete univariate distributions which is computed 
 using <code>support</code> and <code>sum</code>. </dd>
 
 
-<dt>object = "Binom":</dt><dd>clipped first moment
+<dt>object = "AffLinDistribution":</dt><dd>clipped second moment
+for affine linear distributions  which is computed on basis of 
+slot <code>X0</code>. </dd>
+
+
+<dt>object = "Binom":</dt><dd>clipped second moment
 for Binomial distributions which is computed using <code>pbinom</code>. </dd>
 
 
-<dt>object = "Pois":</dt><dd>clipped first moment
+<dt>object = "Pois":</dt><dd>clipped second moment
 for Poisson distributions which is computed using <code>ppois</code>. </dd>
 
 
-<dt>object = "Norm":</dt><dd>clipped first moment
+<dt>object = "Norm":</dt><dd>clipped second moment
 for normal distributions which is computed using <code>dnorm</code> and <code>pnorm</code>. </dd>
 
 
-<dt>object = "Exp":</dt><dd>clipped first moment
+<dt>object = "Exp":</dt><dd>clipped second moment
 for exponential distributions which is computed using <code>pexp</code>. </dd>
 
 
-<dt>object = "Chisq":</dt><dd>clipped first moment
+<dt>object = "Chisq":</dt><dd>clipped second moment
 for <i>Chi^2</i> distributions which is computed using <code>pchisq</code>. </dd>
 </dl>
 

Modified: pkg/distrEx/man/m1df.Rd
===================================================================
--- pkg/distrEx/man/m1df.Rd	2009-04-08 10:44:33 UTC (rev 453)
+++ pkg/distrEx/man/m1df.Rd	2009-04-09 12:06:04 UTC (rev 454)
@@ -3,7 +3,6 @@
 \alias{m1df-methods}
 \alias{m1df,UnivariateDistribution-method}
 \alias{m1df,AbscontDistribution-method}
-%\alias{m1df,DiscreteDistribution-method}
 \alias{m1df,LatticeDistribution-method}
 \alias{m1df,AffLinDistribution-method}
 \alias{m1df,Binom-method}
@@ -44,6 +43,18 @@
    uses call \code{E(object, upp=upper, ...)}.
    }
 
+  \item{object = "AbscontDistribution":}{ clipped first moment
+    for absolutely continuous univariate distributions which is 
+    computed using \code{integrate}. }
+
+  \item{object = "LatticeDistribution":}{ clipped first moment
+    for discrete univariate distributions which is computed 
+    using \code{support} and \code{sum}. }
+
+  \item{object = "AffLinDistribution":}{ clipped first moment
+    for affine linear distributions  which is computed on basis of 
+    slot \code{X0}. }
+
 %  \item{object = "AbscontDistribution":}{ clipped first moment
 %    for absolutely continuous univariate distributions which 
 %    is computed using \code{distrExIntegrate}. }

Modified: pkg/distrEx/man/m2df.Rd
===================================================================
--- pkg/distrEx/man/m2df.Rd	2009-04-08 10:44:33 UTC (rev 453)
+++ pkg/distrEx/man/m2df.Rd	2009-04-09 12:06:04 UTC (rev 454)
@@ -5,6 +5,7 @@
 \alias{m2df,AbscontDistribution-method}
 %\alias{m2df,DiscreteDistribution-method}
 \alias{m2df,LatticeDistribution-method}
+\alias{m2df,AffLinDistribution-method}
 \alias{m2df,Binom-method}
 \alias{m2df,Pois-method}
 \alias{m2df,Norm-method}
@@ -36,6 +37,7 @@
 }
 \section{Methods}{
 \describe{
+
   \item{object = "UnivariateDistribution":}{ %
     %clipped first moment
     %for univariate distributions which is computed using 
@@ -43,27 +45,31 @@
      uses call \code{E(object, upp=upper, fun = function, ...)}.
     }
 
-  \item{object = "AbscontDistribution":}{ clipped first moment
+  \item{object = "AbscontDistribution":}{ clipped second moment
     for absolutely continuous univariate distributions which is 
     computed using \code{integrate}. }
 
-  \item{object = "DiscreteDistribution":}{ clipped first moment
+  \item{object = "LatticeDistribution":}{ clipped second moment
     for discrete univariate distributions which is computed 
     using \code{support} and \code{sum}. }
 
-  \item{object = "Binom":}{ clipped first moment
+  \item{object = "AffLinDistribution":}{ clipped second moment
+    for affine linear distributions  which is computed on basis of 
+    slot \code{X0}. }
+
+  \item{object = "Binom":}{ clipped second moment
     for Binomial distributions which is computed using \code{pbinom}. }
 
-  \item{object = "Pois":}{ clipped first moment
+  \item{object = "Pois":}{ clipped second moment
     for Poisson distributions which is computed using \code{ppois}. }
 
-  \item{object = "Norm":}{ clipped first moment
+  \item{object = "Norm":}{ clipped second moment
     for normal distributions which is computed using \code{dnorm} and \code{pnorm}. }
 
-  \item{object = "Exp":}{ clipped first moment
+  \item{object = "Exp":}{ clipped second moment
     for exponential distributions which is computed using \code{pexp}. }
 
-  \item{object = "Chisq":}{ clipped first moment
+  \item{object = "Chisq":}{ clipped second moment
     for \eqn{\chi^2}{Chi^2} distributions which is computed using \code{pchisq}. }
 }}
 %\references{ ~put references to the literature/web site here ~ }



More information about the Distr-commits mailing list