[Distr-commits] r332 - pkg/distrEx/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 13 09:06:35 CET 2008


Author: stamats
Date: 2008-11-13 09:06:35 +0100 (Thu, 13 Nov 2008)
New Revision: 332

Modified:
   pkg/distrEx/R/Skewness.R
Log:
corrected small bug in skewness for AffLinDistribution. There is an additional problem for AffLinAbscontDistribution; cf. (-Lnorm())@X0 vs. (-Binom())@X0.

Modified: pkg/distrEx/R/Skewness.R
===================================================================
--- pkg/distrEx/R/Skewness.R	2008-11-12 21:27:15 UTC (rev 331)
+++ pkg/distrEx/R/Skewness.R	2008-11-13 08:06:35 UTC (rev 332)
@@ -25,16 +25,16 @@
 
     })
 
-  
+
 setMethod("skewness", signature(x = "AffLinDistribution"),
     function(x, fun = function(t) {t}, cond, withCond = FALSE, useApply = TRUE, ...){
         if (missing(fun) && missing(cond)){
 
-            return( skewness(x at X0, withCond = withCond, useApply = useApply, 
+            return(sign(x at a)*skewness(x at X0, withCond = withCond, useApply = useApply, 
                              ...))
 
             }
-        else return(skewness( x = as(x, sub("AffLin","",class(x))), 
+        else return(skewness(x = as(x, sub("AffLin","",class(x))), 
                     fun = fun, cond = cond, withCond = withCond, 
                     useApply = useApply, ... ))
     })



More information about the Distr-commits mailing list