[Distr-commits] r433 - 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
Mon Mar 23 15:31:10 CET 2009


Author: ruckdeschel
Date: 2009-03-23 15:31:10 +0100 (Mon, 23 Mar 2009)
New Revision: 433

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/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:
forgot to set corresponding distrExoptions()-default values for accuracy  
for m1df, m2df

Modified: branches/distr-2.2/pkg/distrEx/R/ClippedMoments.R
===================================================================
--- branches/distr-2.2/pkg/distrEx/R/ClippedMoments.R	2009-03-23 14:05:01 UTC (rev 432)
+++ branches/distr-2.2/pkg/distrEx/R/ClippedMoments.R	2009-03-23 14:31:10 UTC (rev 433)
@@ -2,8 +2,8 @@
 ## Clipped first and second moments
 ###############################################################################
 setMethod("m1df", "UnivariateDistribution",
-    function(object, upper, ...){
-        return(E(object, upp=upper,...))
+    function(object, upper, ... ){
+        return(E(object, upp=upper, ...))
     })
 setMethod("m2df", "UnivariateDistribution",
     function(object, upper, ...){
@@ -16,6 +16,28 @@
         mc$upp <- upper
         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, ...))
+    })
+setMethod("m2df", "AbscontDistribution",
+    function(object, upper, 
+             lowerTruncQuantile = getdistrExOption("m2dfLowerTruncQuantile"),
+             rel.tol = getdistrExOption("m2dfRelativeTolerance"), ...){
+        mc <- as.list(match.call(call = sys.call(sys.parent(1))))[-1]
+        mc1 <- mc        
+        fun0 <- if(is.null(mc$fun)) 
+                   function(x)x^2 else function(x) (eval(mc1$fun)(x))^2
+        mc$fun <- fun0
+        mc$upper <- NULL
+        mc$upp <- upper
+        mc$lowerTruncQuantile <- lowerTruncQuantile
+        mc$rel.tol <- rel.tol
+        return(do.call("E", args=mc ))
+    })
 #setMethod("m1df", "AbscontDistribution",
 #    function(object, upper, ...){
 #        integrandm1 <- function(x, dfun){ x * dfun(x) }

Modified: branches/distr-2.2/pkg/distrEx/man/m1df.Rd
===================================================================
--- branches/distr-2.2/pkg/distrEx/man/m1df.Rd	2009-03-23 14:05:01 UTC (rev 432)
+++ branches/distr-2.2/pkg/distrEx/man/m1df.Rd	2009-03-23 14:31:10 UTC (rev 433)
@@ -2,7 +2,7 @@
 \alias{m1df}
 \alias{m1df-methods}
 \alias{m1df,UnivariateDistribution-method}
-%\alias{m1df,AbscontDistribution-method}
+\alias{m1df,AbscontDistribution-method}
 %\alias{m1df,DiscreteDistribution-method}
 \alias{m1df,LatticeDistribution-method}
 \alias{m1df,AffLinDistribution-method}
@@ -19,10 +19,15 @@
 }
 \usage{
 m1df(object, upper, ...)
+\S4method{m1df}{AbscontDistribution}(object, upper, 
+             lowerTruncQuantile = getdistrExOption("m1dfLowerTruncQuantile"),
+             rel.tol = getdistrExOption("m1dfRelativeTolerance"), ...)
 }
 \arguments{
   \item{object}{ object of class \code{"Distribution"} }
   \item{upper}{ clipping bound }
+  \item{rel.tol}{relative tolerance for \code{distrExIntegrate}.} 
+  \item{lowerTruncQuantile}{lower quantile for quantile based integration range.}
   \item{\dots}{ additional arguments to \code{E} }
 }
 \details{The precision of the computations can be controlled via 

Modified: branches/distr-2.2/pkg/distrEx/man/m2df.Rd
===================================================================
--- branches/distr-2.2/pkg/distrEx/man/m2df.Rd	2009-03-23 14:05:01 UTC (rev 432)
+++ branches/distr-2.2/pkg/distrEx/man/m2df.Rd	2009-03-23 14:31:10 UTC (rev 433)
@@ -2,7 +2,7 @@
 \alias{m2df}
 \alias{m2df-methods}
 \alias{m2df,UnivariateDistribution-method}
-%\alias{m2df,AbscontDistribution-method}
+\alias{m2df,AbscontDistribution-method}
 %\alias{m2df,DiscreteDistribution-method}
 \alias{m2df,LatticeDistribution-method}
 \alias{m2df,Binom-method}
@@ -18,10 +18,15 @@
 }
 \usage{
 m2df(object, upper, ...)
+\S4method{m2df}{AbscontDistribution}(object, upper, 
+             lowerTruncQuantile = getdistrExOption("m2dfLowerTruncQuantile"),
+             rel.tol = getdistrExOption("m2dfRelativeTolerance"), ...)
 }
 \arguments{
   \item{object}{ object of class \code{"Distribution"} }
   \item{upper}{ clipping bound }
+  \item{rel.tol}{relative tolerance for \code{distrExIntegrate}.} 
+  \item{lowerTruncQuantile}{lower quantile for quantile based integration range.}
   \item{\dots}{ additional arguments to \code{E} }
 }
 \details{The precision of the computations can be controlled via 

Modified: pkg/distrEx/R/ClippedMoments.R
===================================================================
--- pkg/distrEx/R/ClippedMoments.R	2009-03-23 14:05:01 UTC (rev 432)
+++ pkg/distrEx/R/ClippedMoments.R	2009-03-23 14:31:10 UTC (rev 433)
@@ -2,8 +2,8 @@
 ## Clipped first and second moments
 ###############################################################################
 setMethod("m1df", "UnivariateDistribution",
-    function(object, upper, ...){
-        return(E(object, upp=upper,...))
+    function(object, upper, ... ){
+        return(E(object, upp=upper, ...))
     })
 setMethod("m2df", "UnivariateDistribution",
     function(object, upper, ...){
@@ -16,6 +16,28 @@
         mc$upp <- upper
         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, ...))
+    })
+setMethod("m2df", "AbscontDistribution",
+    function(object, upper, 
+             lowerTruncQuantile = getdistrExOption("m2dfLowerTruncQuantile"),
+             rel.tol = getdistrExOption("m2dfRelativeTolerance"), ...){
+        mc <- as.list(match.call(call = sys.call(sys.parent(1))))[-1]
+        mc1 <- mc        
+        fun0 <- if(is.null(mc$fun)) 
+                   function(x)x^2 else function(x) (eval(mc1$fun)(x))^2
+        mc$fun <- fun0
+        mc$upper <- NULL
+        mc$upp <- upper
+        mc$lowerTruncQuantile <- lowerTruncQuantile
+        mc$rel.tol <- rel.tol
+        return(do.call("E", args=mc ))
+    })
 #setMethod("m1df", "AbscontDistribution",
 #    function(object, upper, ...){
 #        integrandm1 <- function(x, dfun){ x * dfun(x) }

Modified: pkg/distrEx/chm/00Index.html
===================================================================
--- pkg/distrEx/chm/00Index.html	2009-03-23 14:05:01 UTC (rev 432)
+++ pkg/distrEx/chm/00Index.html	2009-03-23 14:31:10 UTC (rev 433)
@@ -522,6 +522,8 @@
 <table width="100%">
 <tr><td width="25%"><a href="m1df.html">m1df</a></td>
 <td>Generic Function for the Computation of Clipped First Moments</td></tr>
+<tr><td width="25%"><a href="m1df.html">m1df,AbscontDistribution-method</a></td>
+<td>Generic Function for the Computation of Clipped First Moments</td></tr>
 <tr><td width="25%"><a href="m1df.html">m1df,AffLinDistribution-method</a></td>
 <td>Generic Function for the Computation of Clipped First Moments</td></tr>
 <tr><td width="25%"><a href="m1df.html">m1df,Binom-method</a></td>
@@ -546,6 +548,8 @@
 <td>Function to change the global variables of the package 'distrEx'</td></tr>
 <tr><td width="25%"><a href="m2df.html">m2df</a></td>
 <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,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/distrEx.chm
===================================================================
(Binary files differ)

Modified: pkg/distrEx/chm/distrEx.toc
===================================================================
--- pkg/distrEx/chm/distrEx.toc	2009-03-23 14:05:01 UTC (rev 432)
+++ pkg/distrEx/chm/distrEx.toc	2009-03-23 14:31:10 UTC (rev 433)
@@ -866,6 +866,10 @@
 <param name="Local" value="m1df.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="m1df,AbscontDistribution-method">
+<param name="Local" value="m1df.html">
+</OBJECT>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="m1df,AffLinDistribution-method">
 <param name="Local" value="m1df.html">
 </OBJECT>
@@ -914,6 +918,10 @@
 <param name="Local" value="m2df.html">
 </OBJECT>
 <LI> <OBJECT type="text/sitemap">
+<param name="Name" value="m2df,AbscontDistribution-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-03-23 14:05:01 UTC (rev 432)
+++ pkg/distrEx/chm/m1df.html	2009-03-23 14:31:10 UTC (rev 433)
@@ -8,6 +8,7 @@
 <param name="keyword" value="R:   m1df">
 <param name="keyword" value="R:   m1df-methods">
 <param name="keyword" value="R:   m1df,UnivariateDistribution-method">
+<param name="keyword" value="R:   m1df,AbscontDistribution-method">
 <param name="keyword" value="R:   m1df,LatticeDistribution-method">
 <param name="keyword" value="R:   m1df,AffLinDistribution-method">
 <param name="keyword" value="R:   m1df,Binom-method">
@@ -34,6 +35,10 @@
 
 <pre>
 m1df(object, upper, ...)
+## S4 method for signature 'AbscontDistribution':
+m1df(object, upper, 
+             lowerTruncQuantile = getdistrExOption("m1dfLowerTruncQuantile"),
+             rel.tol = getdistrExOption("m1dfRelativeTolerance"), ...)
 </pre>
 
 
@@ -46,6 +51,12 @@
 <tr valign="top"><td><code>upper</code></td>
 <td>
 clipping bound </td></tr>
+<tr valign="top"><td><code>rel.tol</code></td>
+<td>
+relative tolerance for <code>distrExIntegrate</code>.</td></tr>
+<tr valign="top"><td><code>lowerTruncQuantile</code></td>
+<td>
+lower quantile for quantile based integration range.</td></tr>
 <tr valign="top"><td><code>...</code></td>
 <td>
 additional arguments to <code>E</code> </td></tr>

Modified: pkg/distrEx/chm/m2df.html
===================================================================
--- pkg/distrEx/chm/m2df.html	2009-03-23 14:05:01 UTC (rev 432)
+++ pkg/distrEx/chm/m2df.html	2009-03-23 14:31:10 UTC (rev 433)
@@ -8,6 +8,7 @@
 <param name="keyword" value="R:   m2df">
 <param name="keyword" value="R:   m2df-methods">
 <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,Binom-method">
 <param name="keyword" value="R:   m2df,Pois-method">
@@ -33,6 +34,10 @@
 
 <pre>
 m2df(object, upper, ...)
+## S4 method for signature 'AbscontDistribution':
+m2df(object, upper, 
+             lowerTruncQuantile = getdistrExOption("m2dfLowerTruncQuantile"),
+             rel.tol = getdistrExOption("m2dfRelativeTolerance"), ...)
 </pre>
 
 
@@ -45,6 +50,12 @@
 <tr valign="top"><td><code>upper</code></td>
 <td>
 clipping bound </td></tr>
+<tr valign="top"><td><code>rel.tol</code></td>
+<td>
+relative tolerance for <code>distrExIntegrate</code>.</td></tr>
+<tr valign="top"><td><code>lowerTruncQuantile</code></td>
+<td>
+lower quantile for quantile based integration range.</td></tr>
 <tr valign="top"><td><code>...</code></td>
 <td>
 additional arguments to <code>E</code> </td></tr>

Modified: pkg/distrEx/man/m1df.Rd
===================================================================
--- pkg/distrEx/man/m1df.Rd	2009-03-23 14:05:01 UTC (rev 432)
+++ pkg/distrEx/man/m1df.Rd	2009-03-23 14:31:10 UTC (rev 433)
@@ -2,7 +2,7 @@
 \alias{m1df}
 \alias{m1df-methods}
 \alias{m1df,UnivariateDistribution-method}
-%\alias{m1df,AbscontDistribution-method}
+\alias{m1df,AbscontDistribution-method}
 %\alias{m1df,DiscreteDistribution-method}
 \alias{m1df,LatticeDistribution-method}
 \alias{m1df,AffLinDistribution-method}
@@ -19,10 +19,15 @@
 }
 \usage{
 m1df(object, upper, ...)
+\S4method{m1df}{AbscontDistribution}(object, upper, 
+             lowerTruncQuantile = getdistrExOption("m1dfLowerTruncQuantile"),
+             rel.tol = getdistrExOption("m1dfRelativeTolerance"), ...)
 }
 \arguments{
   \item{object}{ object of class \code{"Distribution"} }
   \item{upper}{ clipping bound }
+  \item{rel.tol}{relative tolerance for \code{distrExIntegrate}.} 
+  \item{lowerTruncQuantile}{lower quantile for quantile based integration range.}
   \item{\dots}{ additional arguments to \code{E} }
 }
 \details{The precision of the computations can be controlled via 

Modified: pkg/distrEx/man/m2df.Rd
===================================================================
--- pkg/distrEx/man/m2df.Rd	2009-03-23 14:05:01 UTC (rev 432)
+++ pkg/distrEx/man/m2df.Rd	2009-03-23 14:31:10 UTC (rev 433)
@@ -2,7 +2,7 @@
 \alias{m2df}
 \alias{m2df-methods}
 \alias{m2df,UnivariateDistribution-method}
-%\alias{m2df,AbscontDistribution-method}
+\alias{m2df,AbscontDistribution-method}
 %\alias{m2df,DiscreteDistribution-method}
 \alias{m2df,LatticeDistribution-method}
 \alias{m2df,Binom-method}
@@ -18,10 +18,15 @@
 }
 \usage{
 m2df(object, upper, ...)
+\S4method{m2df}{AbscontDistribution}(object, upper, 
+             lowerTruncQuantile = getdistrExOption("m2dfLowerTruncQuantile"),
+             rel.tol = getdistrExOption("m2dfRelativeTolerance"), ...)
 }
 \arguments{
   \item{object}{ object of class \code{"Distribution"} }
   \item{upper}{ clipping bound }
+  \item{rel.tol}{relative tolerance for \code{distrExIntegrate}.} 
+  \item{lowerTruncQuantile}{lower quantile for quantile based integration range.}
   \item{\dots}{ additional arguments to \code{E} }
 }
 \details{The precision of the computations can be controlled via 



More information about the Distr-commits mailing list