[Robast-commits] r197 - pkg/ROptEst/inst/scripts

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Oct 31 11:53:08 CET 2008


Author: stamats
Date: 2008-10-31 11:53:08 +0100 (Fri, 31 Oct 2008)
New Revision: 197

Modified:
   pkg/ROptEst/inst/scripts/BinomialModel.R
Log:
added computation of confidence intervals, seems to work correctly ...

Modified: pkg/ROptEst/inst/scripts/BinomialModel.R
===================================================================
--- pkg/ROptEst/inst/scripts/BinomialModel.R	2008-10-31 10:20:59 UTC (rev 196)
+++ pkg/ROptEst/inst/scripts/BinomialModel.R	2008-10-31 10:53:08 UTC (rev 197)
@@ -143,6 +143,11 @@
 estimate(est1c2)
 estimate(est1c3)
 
+## confidence intervals
+confint(est1c, symmetricBias())
+confint(est1c1, symmetricBias())
+confint(est1c2, symmetricBias())
+confint(est1c3, symmetricBias())
 
 ## av) Define infinitesimal robust model
 RobB4 <- InfRobModel(center=BinomFamily(size=25, prob=estimate(est0)),
@@ -172,6 +177,12 @@
 estimate(est1v2)
 estimate(est1v3)
 
+## confidence intervals
+confint(est1v, symmetricBias())
+confint(est1v1, symmetricBias())
+confint(est1v2, symmetricBias())
+confint(est1v3, symmetricBias())
+
 ## 3.2. k-step estimation: radius known
 IC9 <- optIC(model=RobB3, risk=asMSE())
 (est2c <- kStepEstimator(x, IC=IC9, start=est0, steps = 3L))
@@ -193,6 +204,11 @@
 estimate(est2c2)
 estimate(est2c3)
 
+## confidence intervals
+confint(est2c, symmetricBias())
+confint(est2c1, symmetricBias())
+confint(est2c2, symmetricBias())
+confint(est2c3, symmetricBias())
 
 IC10 <- optIC(model=RobB4, risk=asMSE())
 (est2v <- kStepEstimator(x, IC=IC10, start=est0, steps = 3L))
@@ -217,7 +233,13 @@
 estimate(est2v2)
 estimate(est2v3)
 
+## confidence intervals
+confint(est2v, symmetricBias())
+confint(est2v1, symmetricBias())
+confint(est2v2, symmetricBias())
+confint(est2v3, symmetricBias())
 
+
 ## 4.1. one-step estimation: radius interval
 IC11 <- radiusMinimaxIC(L2Fam=BinomFamily(size=25, prob=estimate(est0)),
                 neighbor=ContNeighborhood(), risk=asMSE(), loRad=0, upRad=Inf)
@@ -235,6 +257,19 @@
 (est3v1 <- roptest(x, BinomFamily(size = 25), eps.upper = 0.5, neighbor = TotalVarNeighborhood()))
 checkIC(pIC(est3v1))
 
+## comparison of estimates
+estimate(est3c)
+estimate(est3v)
+estimate(est3c1)
+estimate(est3v1)
+
+## confidence intervals
+confint(est3c, symmetricBias())
+confint(est3v, symmetricBias())
+confint(est3c1, symmetricBias())
+confint(est3v1, symmetricBias())
+
+
 ## 4.2. k-step estimation: radius interval
 IC11 <- radiusMinimaxIC(L2Fam=BinomFamily(size=25, prob=estimate(est0)),
                 neighbor=ContNeighborhood(), risk=asMSE(), loRad=0, upRad=Inf)
@@ -252,3 +287,15 @@
 (est4v1 <- roptest(x, BinomFamily(size = 25), eps.upper = 0.5, neighbor = TotalVarNeighborhood(),
         steps = 3L))
 checkIC(pIC(est4v1))
+
+## comparison of estimates
+estimate(est4c)
+estimate(est4v)
+estimate(est4c1)
+estimate(est4v1)
+
+## confidence intervals
+confint(est4c, symmetricBias())
+confint(est4v, symmetricBias())
+confint(est4c1, symmetricBias())
+confint(est4v1, symmetricBias())



More information about the Robast-commits mailing list