[Distr-commits] r132 - in pkg/distrMod: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue May 6 15:09:06 CEST 2008


Author: ruckdeschel
Date: 2008-05-06 15:09:06 +0200 (Tue, 06 May 2008)
New Revision: 132

Modified:
   pkg/distrMod/R/AllGeneric.R
   pkg/distrMod/R/L2ParamFamily.R
   pkg/distrMod/man/L2ParamFamily-class.Rd
Log:
---------------
pkg distrMod
---------------

generics to FisherInfo and L2deriv gain another argument
param in their signature to dispatch upon, in order to be able to evaluate them at other parameter values;
more specifically if param is "missing" the old behavior pertains, else we return FisherInfo.fct(param)
(and analogously for L2deriv).



Modified: pkg/distrMod/R/AllGeneric.R
===================================================================
--- pkg/distrMod/R/AllGeneric.R	2008-05-06 12:50:22 UTC (rev 131)
+++ pkg/distrMod/R/AllGeneric.R	2008-05-06 13:09:06 UTC (rev 132)
@@ -56,7 +56,7 @@
     setGeneric("dimension", function(object) standardGeneric("dimension"))
 }
 if(!isGeneric("L2deriv")){
-    setGeneric("L2deriv", function(object) standardGeneric("L2deriv"))
+    setGeneric("L2deriv", function(object, param) standardGeneric("L2deriv"))
 }
 if(!isGeneric("L2derivSymm")){
     setGeneric("L2derivSymm", function(object) standardGeneric("L2derivSymm"))
@@ -68,7 +68,7 @@
     setGeneric("L2derivDistrSymm", function(object) standardGeneric("L2derivDistrSymm"))
 }
 if(!isGeneric("FisherInfo")){
-    setGeneric("FisherInfo", function(object) standardGeneric("FisherInfo"))
+    setGeneric("FisherInfo", function(object, param) standardGeneric("FisherInfo"))
 }
 if(!isGeneric("checkL2deriv")){
     setGeneric("checkL2deriv", function(L2Fam, ...) standardGeneric("checkL2deriv"))

Modified: pkg/distrMod/R/L2ParamFamily.R
===================================================================
--- pkg/distrMod/R/L2ParamFamily.R	2008-05-06 12:50:22 UTC (rev 131)
+++ pkg/distrMod/R/L2ParamFamily.R	2008-05-06 13:09:06 UTC (rev 132)
@@ -91,11 +91,18 @@
 }
 
 ## access methods
-setMethod("L2deriv", "L2ParamFamily", function(object) object at L2deriv)
+setMethod("L2deriv", signature(object = "L2ParamFamily", param = "missing"), 
+           function(object) object at L2deriv)
+setMethod("L2deriv", signature(object = "L2ParamFamily", 
+           param = "ParamFamParameter"), 
+           function(object, param) object at L2deriv.fct(param))
 setMethod("L2derivSymm", "L2ParamFamily", function(object) object at L2derivSymm)
 setMethod("L2derivDistr", "L2ParamFamily", function(object) object at L2derivDistr)
 setMethod("L2derivDistrSymm", "L2ParamFamily", function(object) object at L2derivDistrSymm)
-setMethod("FisherInfo", "L2ParamFamily", function(object) object at FisherInfo)
+setMethod("FisherInfo", signature(object = "L2ParamFamily", param = "missing"),
+           function(object) object at FisherInfo)
+setMethod("FisherInfo", signature(object = "L2ParamFamily", param = "ParamFamParameter"),
+           function(object, param) object at FisherInfo.fct(param))
 
 ## check centering of L2 derivative and Fisher Information
 setMethod("checkL2deriv", "L2ParamFamily", 

Modified: pkg/distrMod/man/L2ParamFamily-class.Rd
===================================================================
--- pkg/distrMod/man/L2ParamFamily-class.Rd	2008-05-06 12:50:22 UTC (rev 131)
+++ pkg/distrMod/man/L2ParamFamily-class.Rd	2008-05-06 13:09:06 UTC (rev 132)
@@ -75,6 +75,11 @@
     \item{L2deriv}{\code{signature(object = "L2ParamFamily")}: 
       accessor function for \code{L2deriv}. }
 
+    \item{L2deriv}{\code{signature(object = "L2ParamFamily", 
+                                   param = "ParamFamParameter")}: 
+      returns the L2derivative at \code{param}, i.e.
+      evaluates slot functoin  \code{L2deriv.fct} at \code{param}. }
+
     \item{L2derivSymm}{\code{signature(object = "L2ParamFamily")}: 
       accessor function for \code{L2derivSymm}. }
 
@@ -87,6 +92,11 @@
     \item{FisherInfo}{\code{signature(object = "L2ParamFamily")}:
       accessor function for \code{FisherInfo}. }
 
+    \item{FisherInfo}{\code{signature(object = "L2ParamFamily", 
+                                   param = "ParamFamParameter")}: 
+      returns the Fisher Information at \code{param}, i.e.
+      evaluates slot functoin  \code{FisherInfo.fct} at \code{param}. }
+
     \item{checkL2deriv}{\code{signature(object = "L2ParamFamily")}: 
       check centering of \code{L2deriv} and compute precision 
       of Fisher information. }



More information about the Distr-commits mailing list