[Robast-commits] r1160 - in branches/robast-1.2/pkg/RobAStBase: . R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Aug 18 22:55:25 CEST 2018


Author: ruckdeschel
Date: 2018-08-18 22:55:25 +0200 (Sat, 18 Aug 2018)
New Revision: 1160

Modified:
   branches/robast-1.2/pkg/RobAStBase/NAMESPACE
   branches/robast-1.2/pkg/RobAStBase/R/AllGeneric.R
   branches/robast-1.2/pkg/RobAStBase/R/CheckMakeIC.R
   branches/robast-1.2/pkg/RobAStBase/R/getRiskIC.R
   branches/robast-1.2/pkg/RobAStBase/R/getboundedIC.R
   branches/robast-1.2/pkg/RobAStBase/R/kStepEstimate.R
   branches/robast-1.2/pkg/RobAStBase/R/kStepEstimator.R
   branches/robast-1.2/pkg/RobAStBase/inst/NEWS
   branches/robast-1.2/pkg/RobAStBase/man/checkIC.Rd
   branches/robast-1.2/pkg/RobAStBase/man/kStepEstimate-class.Rd
   branches/robast-1.2/pkg/RobAStBase/man/kStepEstimator.Rd
   branches/robast-1.2/pkg/RobAStBase/man/makeIC-methods.Rd
Log:
[RobAStBase] branch 1.2:
+ new accessor "timings" to attribute "timings" of an object of class "kStepEstimate"
+ kStepEstimator, checkIC/makeIC, getRiskIC (for signature (IC, asCov, missing, L2ParamFamily)) 
  and getboundedIC now if (diagnostic==TRUE) return diagnostic attributes of S3 class 
  "DiagnosticClass"


Modified: branches/robast-1.2/pkg/RobAStBase/NAMESPACE
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/NAMESPACE	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/NAMESPACE	2018-08-18 20:55:25 UTC (rev 1160)
@@ -75,7 +75,7 @@
 exportMethods("ddPlot", "qqplot", "returnlevelplot")
 exportMethods("cutoff.quantile", "cutoff.quantile<-")
 exportMethods("samplesize<-", "samplesize")
-exportMethods("getRiskFctBV", "getFiRisk", "getPIC")
+exportMethods("getRiskFctBV", "getFiRisk", "getPIC", "timings")
 export("oneStepEstimator", "kStepEstimator")
 export("ContNeighborhood", "TotalVarNeighborhood") 
 export("FixRobModel", "InfRobModel") 

Modified: branches/robast-1.2/pkg/RobAStBase/R/AllGeneric.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/AllGeneric.R	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/R/AllGeneric.R	2018-08-18 20:55:25 UTC (rev 1160)
@@ -251,3 +251,6 @@
 if(!isGeneric("getPIC")){
     setGeneric("getPIC", function(estimator) standardGeneric("getPIC"))
 }
+if(!isGeneric("timings")){
+    setGeneric("timings", function(object, ...) standardGeneric("timings"))
+}

Modified: branches/robast-1.2/pkg/RobAStBase/R/CheckMakeIC.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/CheckMakeIC.R	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/R/CheckMakeIC.R	2018-08-18 20:55:25 UTC (rev 1160)
@@ -24,8 +24,10 @@
             res[i] <- buf <- do.call(E, Eargs)
             if(diagnostic){ k <- k + 1; diagn[[k]] <- attr(buf,"diagnostic") }
         }
-        if(diagnostic) attr(res, "diagnostic") <- diagn[1:nrvalues]
-
+        if(diagnostic){
+           attr(res, "diagnostic") <- diagn[1:nrvalues]
+           class(attr(res,"diagnostic")) <- "DiagnosticClass"
+        }
         erg <- matrix(0, ncol = dims, nrow = nrvalues)
 
         for(i in 1:nrvalues)
@@ -35,8 +37,10 @@
                 erg[i, j] <- buf <- do.call(E, Eargs)
                 if(diagnostic){ k <- k + 1; diagn[[k]] <- attr(buf,"diagnostic") }
             }
-        if(diagnostic) attr(erg, "diagnostic") <- diagn[-(1:nrvalues)]
-
+        if(diagnostic){
+           attr(erg, "diagnostic") <- diagn[-(1:nrvalues)]
+           class(attr(erg,"diagnostic")) <- "DiagnosticClass"
+        }
         return(list(E.IC=res,E.IC.L=erg))
 }
 
@@ -83,9 +87,11 @@
            print(attr(res$E.IC.L,"diagnostic"))
         }
 
-        if(diagnostic)
+        if(diagnostic){
            attr(prec,"diagnostic") <- c(attr(res$E.IC,"diagnostic"),
                                         attr(res$E.IC.L,"diagnostic"))
+           class(attr(prec,"diagnostic")) <- "DiagnosticClass"
+        }
         return(prec)
     })
 
@@ -136,9 +142,11 @@
                   CallL2Fam = CallL2Fam,
                   modifyIC = modifyIC)
 
-        if(diagnostic)
+        if(diagnostic){
            attr(IC.0,"diagnostic") <- c(attr(res$E.IC,"diagnostic"),
                                         attr(res$E.IC.L,"diagnostic"))
+           class(attr(IC.0,"diagnostic")) <- "DiagnosticClass"
+        }
         return(IC.0)
     })
 

Modified: branches/robast-1.2/pkg/RobAStBase/R/getRiskIC.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/getRiskIC.R	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/R/getRiskIC.R	2018-08-18 20:55:25 UTC (rev 1160)
@@ -64,7 +64,10 @@
         }
         Cova[col(Cova) < row(Cova)] <- t(Cova)[col(Cova) < row(Cova)]
         # if(withCheck) .checkICWithWarning(IC, L2Fam, tol, ...)
-        if(diagnostic) attr(Cova,"diagnostic") <- diagn
+        if(diagnostic){
+           attr(Cova,"diagnostic") <- diagn
+           class(attr(Cova,"diagnostic")) <- "DiagnosticClass"
+        }
         return(list(asCov = list(distribution = .getDistr(L2Fam), value = Cova)))
     })
 

Modified: branches/robast-1.2/pkg/RobAStBase/R/getboundedIC.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/getboundedIC.R	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/R/getboundedIC.R	2018-08-18 20:55:25 UTC (rev 1160)
@@ -62,6 +62,9 @@
         stand <- as.matrix(D %*% distr::solve(stand.0, generalized = TRUE))
         L2w0 <- L2w - cent
         res <- as(stand %*% L2w0, "EuclRandVariable")
-        if(diagnostic) attr(res,"diagnostic") <- diagn
+        if(diagnostic){
+           attr(res,"diagnostic") <- diagn
+           class(attr(res,"diagnostic")) <- "DiagnosticClass"
+        }
         return(res)
 }

Modified: branches/robast-1.2/pkg/RobAStBase/R/kStepEstimate.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/kStepEstimate.R	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/R/kStepEstimate.R	2018-08-18 20:55:25 UTC (rev 1160)
@@ -26,3 +26,5 @@
      colnames(mm) <- paste((1:ncol(mm))-1)
      return(mm)
 })
+setMethod("timings", "kStepEstimate", function(object, ...)
+   attr(object, "timings"))

Modified: branches/robast-1.2/pkg/RobAStBase/R/kStepEstimator.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/kStepEstimator.R	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/R/kStepEstimator.R	2018-08-18 20:55:25 UTC (rev 1160)
@@ -508,7 +508,10 @@
         estres <- .checkEstClassForParamFamily(L2Fam,estres)
 
         attr(estres,"timings") <- apply(sytm,2,diff)
-        if(diagnostic) attr(estres,"diagnostic") <- diagn
+        if(diagnostic){
+           attr(estres,"diagnostic") <- diagn
+           class(attr(estres,"diagnostic")) <- "DiagnosticClass"
+        }
         on.exit()
         return(estres)
 

Modified: branches/robast-1.2/pkg/RobAStBase/inst/NEWS
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/inst/NEWS	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/inst/NEWS	2018-08-18 20:55:25 UTC (rev 1160)
@@ -30,6 +30,7 @@
   checkIC and makeIC gain argument diagnostic to be able to show diagnostic 
   information on integrations; this information (if argument "diagnostic" is TRUE)
   is stored in attribute "diagnostic" of the return value
++ accessor "timings" to attribute "timings" of an object of class "kStepEstimate"
   
 bugfixes  
 + and a forgotten no longer used instance of oldmodif in kStepEstimator
@@ -97,6 +98,9 @@
   overwrites existing entries).
 + getboundedIC now uses coordinate-wise integration with useApply = FALSE and 
   only computing the upper half of E LL'w 
++ kStepEstimator, checkIC/makeIC, getRiskIC (for signature (IC, asCov, missing, L2ParamFamily)) 
+  and getboundedIC now if (diagnostic==TRUE) return diagnostic attributes of S3 class 
+  "DiagnosticClass"
   
 #######################################
 version 1.1
@@ -129,7 +133,6 @@
 + getRiskIC and getBiasIC gain argument withCheck to speed up things if one does not want to call checkIC 
 + in kStepEstimator, withCheck is set to FALSE when getRiskIC is called, and makeIC is only called just 
   before the last update, and, if useLast == TRUE for the last update (of course, only if withMakeIC ==TRUE)
-+ kStepEstimator, 
   
 Return value of "roptest"
 + the return value of "roptest", an object of class "kStepEstimate" has a slot "estimate.call" which

Modified: branches/robast-1.2/pkg/RobAStBase/man/checkIC.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/checkIC.Rd	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/man/checkIC.Rd	2018-08-18 20:55:25 UTC (rev 1160)
@@ -26,6 +26,12 @@
 \details{ 
   The precisions of the centering and the Fisher consistency
   are computed.
+
+  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}}.
 }
 \value{The maximum deviation from the IC properties is returned.}
 \references{

Modified: branches/robast-1.2/pkg/RobAStBase/man/kStepEstimate-class.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/kStepEstimate-class.Rd	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/man/kStepEstimate-class.Rd	2018-08-18 20:55:25 UTC (rev 1160)
@@ -20,6 +20,8 @@
 \alias{ustartval}
 \alias{ustartval,kStepEstimate-method}
 \alias{show,kStepEstimate-method}
+\alias{timings}
+\alias{timings,kStepEstimate-method}
 
 \title{kStepEstimate-class.}
 \description{Class of asymptotically linear estimates.}
@@ -128,11 +130,15 @@
     \item{robestCall}{\code{signature(object = "kStepEstimate")}:
       accessor function for slot \code{robestCall}. }
 
+    \item{timings}{\code{signature(object = "kStepEstimate")}:
+      accessor function for attribute \code{"timings"}. }
+
     \item{show}{\code{signature(object = "kStepEstimate")}: a show method; }
   }
 }
 %\references{}
-\author{Matthias Kohl \email{Matthias.Kohl at stamats.de}}
+\author{Matthias Kohl \email{Matthias.Kohl at stamats.de} and
+Peter Ruckdeschel \email{peter.ruckdeschel at uni-oldenurg.de}}
 %\note{}
 \seealso{\code{\link{ALEstimate-class}}}
 %\examples{}

Modified: branches/robast-1.2/pkg/RobAStBase/man/kStepEstimator.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/kStepEstimator.Rd	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/man/kStepEstimator.Rd	2018-08-18 20:55:25 UTC (rev 1160)
@@ -86,6 +86,13 @@
 
   Timings for the several substeps are available as attribute
   \code{timings} of the return value.
+
+  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}}.
+
 }
 \value{Object of class \code{"kStepEstimate"}.}
 

Modified: branches/robast-1.2/pkg/RobAStBase/man/makeIC-methods.Rd
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/man/makeIC-methods.Rd	2018-08-18 20:28:44 UTC (rev 1159)
+++ branches/robast-1.2/pkg/RobAStBase/man/makeIC-methods.Rd	2018-08-18 20:55:25 UTC (rev 1160)
@@ -48,6 +48,24 @@
     as attribute \code{diagnostic} of the return value. }
 }
 \value{An IC of class \code{"IC"} at the model.}
+\details{
+  Argument \code{IC} is transformed affinely such that the transformed IC
+  satisfies the defining side conditions of an IC, i.e., centeredness and
+  Fisher consistency:
+
+  \deqn{\mathop{\mbox{\boldmath$E$}}[{\rm IC}]=0}{E[IC]=0}
+  \deqn{\mathop{\mbox{\boldmath$E$}}[{\rm IC}\,\Lambda^\tau]= D}{E[IC Lambda'] = D}
+
+  where \eqn{\Lambda}{Lambda} is the L2 derivative of the model and D is
+  the Jacobian of transformation \code{trafo}.
+
+  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}}.
+}
+
 \section{Methods}{\describe{
 \item{makeIC}{\code{signature(IC = "IC", L2Fam = "missing"}: creates 
           an object of class \code{"IC"} at the parametric model of its own



More information about the Robast-commits mailing list