[Distr-commits] r320 - branches/distr-2.1/pkg/distrEx/R branches/distr-2.1/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
Wed Oct 29 20:28:43 CET 2008


Author: ruckdeschel
Date: 2008-10-29 20:28:40 +0100 (Wed, 29 Oct 2008)
New Revision: 320

Modified:
   branches/distr-2.1/pkg/distrEx/R/ClippedMoments.R
   branches/distr-2.1/pkg/distrEx/man/m1df.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/man/m1df.Rd
Log:
m1df for AffLinDistribution

Modified: branches/distr-2.1/pkg/distrEx/R/ClippedMoments.R
===================================================================
--- branches/distr-2.1/pkg/distrEx/R/ClippedMoments.R	2008-10-29 18:43:34 UTC (rev 319)
+++ branches/distr-2.1/pkg/distrEx/R/ClippedMoments.R	2008-10-29 19:28:40 UTC (rev 320)
@@ -118,12 +118,22 @@
         return(dfr*(dfr+2)*pchisq(upper, df = (dfr+4)))
     })
 setMethod("m1df", "LatticeDistribution",
-    function(object, upper)
+    function(object, upper){
         getMethod("m1df", "DiscreteDistribution")(
               as(object, "DiscreteDistribution"), upper)
-    )
+    })
 setMethod("m2df", "LatticeDistribution",
-    function(object, upper)
+    function(object, upper){
         getMethod("m2df", "DiscreteDistribution")(
               as(object, "DiscreteDistribution"), upper)
-    )
+    })
+
+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
+    })

Modified: branches/distr-2.1/pkg/distrEx/man/m1df.Rd
===================================================================
--- branches/distr-2.1/pkg/distrEx/man/m1df.Rd	2008-10-29 18:43:34 UTC (rev 319)
+++ branches/distr-2.1/pkg/distrEx/man/m1df.Rd	2008-10-29 19:28:40 UTC (rev 320)
@@ -5,6 +5,7 @@
 \alias{m1df,AbscontDistribution-method}
 \alias{m1df,DiscreteDistribution-method}
 \alias{m1df,LatticeDistribution-method}
+\alias{m1df,AffLinDistribution-method}
 \alias{m1df,Binom-method}
 \alias{m1df,Pois-method}
 \alias{m1df,Norm-method}

Modified: pkg/distrEx/R/ClippedMoments.R
===================================================================
--- pkg/distrEx/R/ClippedMoments.R	2008-10-29 18:43:34 UTC (rev 319)
+++ pkg/distrEx/R/ClippedMoments.R	2008-10-29 19:28:40 UTC (rev 320)
@@ -118,12 +118,22 @@
         return(dfr*(dfr+2)*pchisq(upper, df = (dfr+4)))
     })
 setMethod("m1df", "LatticeDistribution",
-    function(object, upper)
+    function(object, upper){
         getMethod("m1df", "DiscreteDistribution")(
               as(object, "DiscreteDistribution"), upper)
-    )
+    })
 setMethod("m2df", "LatticeDistribution",
-    function(object, upper)
+    function(object, upper){
         getMethod("m2df", "DiscreteDistribution")(
               as(object, "DiscreteDistribution"), upper)
-    )
+    })
+
+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
+    })

Modified: pkg/distrEx/chm/00Index.html
===================================================================
--- pkg/distrEx/chm/00Index.html	2008-10-29 18:43:34 UTC (rev 319)
+++ pkg/distrEx/chm/00Index.html	2008-10-29 19:28:40 UTC (rev 320)
@@ -468,6 +468,8 @@
 <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>
 <td>Generic Function for the Computation of Clipped First Moments</td></tr>
 <tr><td width="25%"><a href="m1df.html">m1df,Chisq-method</a></td>

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

Modified: pkg/distrEx/chm/distrEx.toc
===================================================================
--- pkg/distrEx/chm/distrEx.toc	2008-10-29 18:43:34 UTC (rev 319)
+++ pkg/distrEx/chm/distrEx.toc	2008-10-29 19:28:40 UTC (rev 320)
@@ -762,6 +762,10 @@
 <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>
+<LI> <OBJECT type="text/sitemap">
 <param name="Name" value="m1df,Binom-method">
 <param name="Local" value="m1df.html">
 </OBJECT>

Modified: pkg/distrEx/chm/m1df.html
===================================================================
--- pkg/distrEx/chm/m1df.html	2008-10-29 18:43:34 UTC (rev 319)
+++ pkg/distrEx/chm/m1df.html	2008-10-29 19:28:40 UTC (rev 320)
@@ -11,6 +11,7 @@
 <param name="keyword" value="R:   m1df,AbscontDistribution-method">
 <param name="keyword" value="R:   m1df,DiscreteDistribution-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">
 <param name="keyword" value="R:   m1df,Pois-method">
 <param name="keyword" value="R:   m1df,Norm-method">

Modified: pkg/distrEx/man/m1df.Rd
===================================================================
--- pkg/distrEx/man/m1df.Rd	2008-10-29 18:43:34 UTC (rev 319)
+++ pkg/distrEx/man/m1df.Rd	2008-10-29 19:28:40 UTC (rev 320)
@@ -5,6 +5,7 @@
 \alias{m1df,AbscontDistribution-method}
 \alias{m1df,DiscreteDistribution-method}
 \alias{m1df,LatticeDistribution-method}
+\alias{m1df,AffLinDistribution-method}
 \alias{m1df,Binom-method}
 \alias{m1df,Pois-method}
 \alias{m1df,Norm-method}



More information about the Distr-commits mailing list