[Distr-commits] r1286 - in branches/distr-2.8/pkg/distrMod: R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Aug 18 22:32:49 CEST 2018


Author: ruckdeschel
Date: 2018-08-18 22:32:48 +0200 (Sat, 18 Aug 2018)
New Revision: 1286

Modified:
   branches/distr-2.8/pkg/distrMod/R/Expectation.R
   branches/distr-2.8/pkg/distrMod/R/asCvMVarianceQtl.R
   branches/distr-2.8/pkg/distrMod/inst/NEWS
   branches/distr-2.8/pkg/distrMod/man/L2ParamFamily-class.Rd
   branches/distr-2.8/pkg/distrMod/man/MDEstimator.Rd
Log:
[distrMod] branch 2.8
+ E methods with signature(object = "L2ParamFamily" , ...) if (diagnostic==TRUE) return 
  diagnostic attributes of S3 class  "DiagnosticClass"
+ .CvMMDCovariance() if (diagnostic==TRUE) returns diagnostic attributes of S3 class  
  "DiagnosticClass"


Modified: branches/distr-2.8/pkg/distrMod/R/Expectation.R
===================================================================
--- branches/distr-2.8/pkg/distrMod/R/Expectation.R	2018-08-18 20:31:00 UTC (rev 1285)
+++ branches/distr-2.8/pkg/distrMod/R/Expectation.R	2018-08-18 20:32:48 UTC (rev 1286)
@@ -16,7 +16,10 @@
            diagn[["call"]] <- match.call()
         }
         res <- matrix(res, nrow = nrow(fun))
-        if(diagnostic) attr(res, "diagnostic") <- diagn
+        if(diagnostic){
+           attr(res, "diagnostic") <- diagn
+           class(attr(res,"diagnostic"))<- "DiagnosticClass"
+        }
         return(res)
     })
 setMethod("E", signature(object = "L2ParamFamily", 
@@ -34,6 +37,8 @@
         if(diagnostic){
            diagn <- attr(res,"diagnostic")
            diagn[["call"]] <- match.call()
-        }
+           attr(res, "diagnostic") <- diagn
+           class(attr(res,"diagnostic"))<- "DiagnosticClass"
+       }
         return(res)
     })

Modified: branches/distr-2.8/pkg/distrMod/R/asCvMVarianceQtl.R
===================================================================
--- branches/distr-2.8/pkg/distrMod/R/asCvMVarianceQtl.R	2018-08-18 20:31:00 UTC (rev 1285)
+++ branches/distr-2.8/pkg/distrMod/R/asCvMVarianceQtl.R	2018-08-18 20:32:48 UTC (rev 1286)
@@ -566,7 +566,11 @@
   }
   nms <- names(c(main(param(L2Fam)),nuisance(param(L2Fam))))
   dimnames(E4) = list(nms,nms)
-  if(diagnostic &&! withpreIC) attr(E4,"diagnostic") <- diagn
+  if(diagnostic) class(diagn) <- "DiagnosticClass"
+  if(diagnostic &&! withpreIC){
+     attr(E4,"diagnostic") <- diagn
+     class(attr(E4,"diagnostic"))<- "DiagnosticClass"
+  }
   if(withpreIC) return(list(preIC=psi, Var=E4, diagnostic = diagn))
   else return(E4)
 }

Modified: branches/distr-2.8/pkg/distrMod/inst/NEWS
===================================================================
--- branches/distr-2.8/pkg/distrMod/inst/NEWS	2018-08-18 20:31:00 UTC (rev 1285)
+++ branches/distr-2.8/pkg/distrMod/inst/NEWS	2018-08-18 20:32:48 UTC (rev 1286)
@@ -115,6 +115,10 @@
 + now specified that we want to use distr::solve
 + E() methods with signature(object = "L2ParamFamily" , ...) use filtering of dots arguments
   (like E()-methods in distrEx v 2.8.0)
++ E methods with signature(object = "L2ParamFamily" , ...) if (diagnostic==TRUE) return 
+  diagnostic attributes of S3 class  "DiagnosticClass"
++ .CvMMDCovariance() if (diagnostic==TRUE) returns diagnostic attributes of S3 class  
+  "DiagnosticClass"
 
 
 ##############

Modified: branches/distr-2.8/pkg/distrMod/man/L2ParamFamily-class.Rd
===================================================================
--- branches/distr-2.8/pkg/distrMod/man/L2ParamFamily-class.Rd	2018-08-18 20:31:00 UTC (rev 1285)
+++ branches/distr-2.8/pkg/distrMod/man/L2ParamFamily-class.Rd	2018-08-18 20:32:48 UTC (rev 1286)
@@ -251,6 +251,16 @@
       moves the L2-parametric Family \code{model} to parameter \code{param} }
   }
 }
+
+\details{
+In the \code{E}-methods, diagnostics on the involved integrations are available
+if argument   \code{diagnostic} is \code{TRUE}. Then there is attribute
+\code{diagnostic} attached to the return value, which may be inspected
+  and accessed through \code{\link[distrEx:distrExIntegrate]{showDiagnostic}} and
+  \code{\link[distrEx:distrExIntegrate]{getDiagnostic}}.
+
+}
+
 \references{
   Rieder, H. (1994) \emph{Robust Asymptotic Statistics}. New York: Springer.
 

Modified: branches/distr-2.8/pkg/distrMod/man/MDEstimator.Rd
===================================================================
--- branches/distr-2.8/pkg/distrMod/man/MDEstimator.Rd	2018-08-18 20:31:00 UTC (rev 1285)
+++ branches/distr-2.8/pkg/distrMod/man/MDEstimator.Rd	2018-08-18 20:32:48 UTC (rev 1286)
@@ -114,7 +114,14 @@
   of helper function \code{.CvMMDCovarianceWithMux}, case of alternative
   \code{"Mod"} we use helper function \code{.CvMMDCovariance}. In both
   case one may use these helper function to get hand on the respective
-  influence function.
+  influence function. For covariances computed by \code{.CvMMDCovariance},
+  diagnostics on the involved integrations are available if argument
+  \code{diagnostic} is \code{TRUE}. Then there is attribute \code{diagnostic}
+  attached to the return value, which may be inspected
+  and accessed through \code{\link[distrEx:distrExIntegrate]{showDiagnostic}} and
+  \code{\link[distrEx:distrExIntegrate]{getDiagnostic}}.
+
+
   \code{KolmogorovMDEstimator} uses Kolmogorov distance, see
   \code{\link[distrEx]{KolmogorovDist}}, \code{TotalVarMDEstimator},
   uses total variation distance, see \code{\link[distrEx]{TotalVarDist}}



More information about the Distr-commits mailing list