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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 15 11:19:20 CEST 2008


Author: stamats
Date: 2008-08-15 11:19:19 +0200 (Fri, 15 Aug 2008)
New Revision: 163

Modified:
   branches/robast-0.6/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R
Log:
adaption to new implementation

Modified: branches/robast-0.6/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R
===================================================================
--- branches/robast-0.6/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R	2008-08-15 09:19:04 UTC (rev 162)
+++ branches/robast-0.6/pkg/ROptEst/inst/scripts/NormalLocationScaleModel.R	2008-08-15 09:19:19 UTC (rev 163)
@@ -92,6 +92,17 @@
 N0.r.rho1 <- leastFavorableRadius(L2Fam=N0, neighbor=ContNeighborhood(),
                     risk=asMSE(), rho=0.5)
 
+
+library(ROptEst)
+library(MASS)
+data(chem)
+initial.est <- c(median(chem), mad(chem))
+system.time(ROest1 <- roptest(chem, NormLocationScaleFamily(), eps.upper = 0.05, steps = 3L, 
+                           initial.est = initial.est))
+
+library(RobLox)
+system.time(ROest2 <- roblox(chem, eps.upper = 0.05, k = 3, returnIC = TRUE))
+
 ## one-step estimation
 ## 1. generate a contaminated sample
 ind <- rbinom(100, size=1, prob=0.05) 



More information about the Robast-commits mailing list