[Robast-commits] r206 - pkg/ROptEst/inst/scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Nov 3 08:57:57 CET 2008
Author: stamats
Date: 2008-11-03 08:57:57 +0100 (Mon, 03 Nov 2008)
New Revision: 206
Modified:
pkg/ROptEst/inst/scripts/NormalScaleModel.R
Log:
added confidence interval, corrected small bug, seems to work correctly ...
Modified: pkg/ROptEst/inst/scripts/NormalScaleModel.R
===================================================================
--- pkg/ROptEst/inst/scripts/NormalScaleModel.R 2008-11-03 06:33:23 UTC (rev 205)
+++ pkg/ROptEst/inst/scripts/NormalScaleModel.R 2008-11-03 07:57:57 UTC (rev 206)
@@ -77,13 +77,13 @@
x <- rnorm(1e2, mean=1, sd = (1-ind)+ind*9)
## 1-step: contamination known
-est1 <- roptest(x, eps = 0.05, L2Fam = NormScaleFamily())
-est1v <- roptest(x, eps = 0.025, L2Fam = NormScaleFamily(),
+est1 <- roptest(x, eps = 0.05, L2Fam = NormScaleFamily(mean = 1))
+est1v <- roptest(x, eps = 0.025, L2Fam = NormScaleFamily(mean = 1),
neighbor = TotalVarNeighborhood())
## k-step: contamination known
-est2 <- roptest(x, eps = 0.05, L2Fam = NormScaleFamily(), steps = 3)
-est2v <- roptest(x, eps = 0.025, L2Fam = NormScaleFamily(),
+est2 <- roptest(x, eps = 0.05, L2Fam = NormScaleFamily(mean = 1), steps = 3)
+est2v <- roptest(x, eps = 0.025, L2Fam = NormScaleFamily(mean = 1),
neighbor = TotalVarNeighborhood(), steps = 3)
## comparison
@@ -91,3 +91,9 @@
estimate(est2)
estimate(est1v)
estimate(est2v)
+
+## confidence intervals
+confint(est1, symmetricBias())
+confint(est2, symmetricBias())
+confint(est1v, symmetricBias())
+confint(est2v, symmetricBias())
More information about the Robast-commits
mailing list