[Robast-commits] r780 - in branches/robast-1.0/pkg/RobAStBase: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Aug 10 19:55:08 CEST 2014


Author: ruckdeschel
Date: 2014-08-10 19:55:08 +0200 (Sun, 10 Aug 2014)
New Revision: 780

Modified:
   branches/robast-1.0/pkg/RobAStBase/R/kStepEstimator.R
   branches/robast-1.0/pkg/RobAStBase/R/oneStepEstimator.R
   branches/robast-1.0/pkg/RobAStBase/inst/NEWS
Log:
[RobAStBase]: output in kStepEstimator() and oneStepEstimator() is filtered
  by  .checkEstClassForParamFamily(); this allows to return an
  object of S4 class specific to the resp. parametric family (by means of
  S4 method dispatch); this is used in pkg 'RobExtremes' to produce, e.g., 
  objects of class "GEVkStepEstimate", i.e. which inherit from both 
  "kStepEstimate", so that a diag-method for "GEVEstimate" becomes 
  available for this class.

Modified: branches/robast-1.0/pkg/RobAStBase/R/kStepEstimator.R
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/R/kStepEstimator.R	2014-08-10 12:42:06 UTC (rev 779)
+++ branches/robast-1.0/pkg/RobAStBase/R/kStepEstimator.R	2014-08-10 17:55:08 UTC (rev 780)
@@ -342,7 +342,7 @@
           dimnames(asVar) <- list(nms.theta.idx, nms.theta.idx)
         }
 
-        return(new("kStepEstimate", estimate.call = es.call,
+        estres <- new("kStepEstimate", estimate.call = es.call,
                 name = paste(steps, "-step estimate", sep = ""),
                 estimate = theta, samplesize = nrow(x0), asvar = asVar,
                 trafo = tf, fixed = fixed, nuis.idx = nuis.idx,
@@ -350,7 +350,9 @@
                 untransformed.asvar = u.var, asbias = asBias, pIC = IC,
                 steps = steps, Infos = Infos, start = start,
                 startval = start.val, ustartval = u.start.val, ksteps = ksteps,
-                uksteps = uksteps, pICList = pICList, ICList = ICList))
+                uksteps = uksteps, pICList = pICList, ICList = ICList)
+        return(.checkEstClassForParamFamily(L2Fam,estres))
+
 }
 #  (est1.NS <- kStepEstimator(x, IC2.NS, est0, steps = 1))
 

Modified: branches/robast-1.0/pkg/RobAStBase/R/oneStepEstimator.R
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/R/oneStepEstimator.R	2014-08-10 12:42:06 UTC (rev 779)
+++ branches/robast-1.0/pkg/RobAStBase/R/oneStepEstimator.R	2014-08-10 17:55:08 UTC (rev 780)
@@ -55,13 +55,16 @@
         nuis.idx <- if(is(start,"Estimate")) start at nuis.idx else NULL
         fixed <- if(is(start,"Estimate")) start at fixed else NULL
 
-        new("kStepEstimate", name = "1-step estimate", estimate = res,
+        estres <- new("kStepEstimate", name = "1-step estimate", estimate = res,
             untransformed.estimate = res, untransformed.asvar = NULL,
              fixed = fixed, nuis.idx = nuis.idx,
              completecases = completecases,
             estimate.call = es.call, samplesize = nrow(x0), asvar = asVar,
             asbias = asBias, pIC = IC, steps = 1L, Infos = Infos,
             start = start, startval = start.val, ustartval = start.val)
+        L2Fam <- eval(CallL2Fam(IC))
+
+        return(.checkEstClassForParamFamily(L2Fam,estres))
     }
 
 

Modified: branches/robast-1.0/pkg/RobAStBase/inst/NEWS
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/inst/NEWS	2014-08-10 12:42:06 UTC (rev 779)
+++ branches/robast-1.0/pkg/RobAStBase/inst/NEWS	2014-08-10 17:55:08 UTC (rev 780)
@@ -48,6 +48,14 @@
  whether values +-infinity are taken at all. (This was a bug
  before for distributions passed on as cdf and quantile function
  with finite left or right endpoint.)
++ output in kStepEstimator() and oneStepEstimator() is filtered
+  by  .checkEstClassForParamFamily(); this allows to return an
+  object of S4 class specific to the resp. parametric family (by means of
+  S4 method dispatch); this is used in pkg 'RobExtremes' to produce, e.g., 
+  objects of class "GEVkStepEstimate", i.e. which inherit from both 
+  "kStepEstimate", so that a diag-method for "GEVEstimate" becomes 
+  available for this class.
+
   
 BUGFIXES:
 + two bugs in plotWrapper.R in pkgs RobAStBase and ROptEst detected by Misha



More information about the Robast-commits mailing list