[Robast-commits] r156 - branches/robast-0.6/pkg/ROptEst/inst/scripts

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 8 09:53:43 CEST 2008


Author: stamats
Date: 2008-08-08 09:53:43 +0200 (Fri, 08 Aug 2008)
New Revision: 156

Modified:
   branches/robast-0.6/pkg/ROptEst/inst/scripts/PoissonModel.R
Log:
adapted to new implementation, seems to work ...

Modified: branches/robast-0.6/pkg/ROptEst/inst/scripts/PoissonModel.R
===================================================================
--- branches/robast-0.6/pkg/ROptEst/inst/scripts/PoissonModel.R	2008-08-08 07:36:56 UTC (rev 155)
+++ branches/robast-0.6/pkg/ROptEst/inst/scripts/PoissonModel.R	2008-08-08 07:53:43 UTC (rev 156)
@@ -159,7 +159,17 @@
 (est214 <- kStepEstimator(x, IC=IC10, start=est12, steps = 3L))
 checkIC(pIC(est214))
 
+(est215 <- roptest(x, PoisFamily(), eps.upper = 1/sqrt(length(x)), steps = 3L))
+checkIC(pIC(est215))
 
+## comparision of estimates
+estimate(est211)
+estimate(est212)
+estimate(est213)
+estimate(est214)
+estimate(est215)
+
+
 ## 2.2 amount of contamination unknown
 IC11 <- radiusMinimaxIC(L2Fam=PoisFamily(lambda=estimate(est11)),
                 neighbor=ContNeighborhood(), risk=asMSE(), loRad=0, upRad=Inf)
@@ -178,6 +188,17 @@
 (est224 <- kStepEstimator(x, IC=IC12, start=est12, steps = 3L))
 checkIC(pIC(est224))
 
+(est225 <- roptest(x, PoisFamily(), eps.upper = 0.5, steps = 3L))
+checkIC(pIC(est225))
+
+## comparision of estimates
+estimate(est221)
+estimate(est222)
+estimate(est223)
+estimate(est224)
+estimate(est225)
+
+
 ## 3. k-step estimation: total variation neighborhood
 ## 3.1 small amount of contamination < 2%
 IC13 <- radiusMinimaxIC(L2Fam=PoisFamily(lambda=estimate(est11)),
@@ -198,7 +219,18 @@
 (est314 <- kStepEstimator(x, IC=IC14, start=est12, steps = 3L))
 checkIC(pIC(est314))
 
+(est315 <- roptest(x, PoisFamily(), eps.upper = 1/sqrt(length(x)), steps = 3L, 
+                   neighbor = TotalVarNeighborhood()))
+checkIC(pIC(est315))
 
+## comparison of estimates
+estimate(est311)
+estimate(est312)
+estimate(est313)
+estimate(est314)
+estimate(est315)
+
+
 ## 3.2 amount of contamination unknown
 IC15 <- radiusMinimaxIC(L2Fam=PoisFamily(lambda=estimate(est11)),
                 neighbor=TotalVarNeighborhood(), risk=asMSE(), loRad=0, upRad=Inf)
@@ -217,4 +249,15 @@
 (est324 <- kStepEstimator(x, IC=IC16, start=est12, steps = 3L))
 checkIC(pIC(est324))
 
+(est325 <- roptest(x, PoisFamily(), eps.upper = 0.5, steps = 3L, 
+                   neighbor = TotalVarNeighborhood()))
+checkIC(pIC(est325))
+
+## comparision of estimates
+estimate(est321)
+estimate(est322)
+estimate(est323)
+estimate(est324)
+estimate(est325)
+
 distroptions("TruncQuantile", 1e-5) # default



More information about the Robast-commits mailing list