[Robast-commits] r63 - pkg/RobLox/inst/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 21 10:13:22 CET 2008


Author: stamats
Date: 2008-02-21 10:13:22 +0100 (Thu, 21 Feb 2008)
New Revision: 63

Modified:
   pkg/RobLox/inst/tests/tests.R
Log:
tests further extended and documented

Modified: pkg/RobLox/inst/tests/tests.R
===================================================================
--- pkg/RobLox/inst/tests/tests.R	2008-02-21 09:06:06 UTC (rev 62)
+++ pkg/RobLox/inst/tests/tests.R	2008-02-21 09:13:22 UTC (rev 63)
@@ -4,7 +4,10 @@
 
 library(RobLox)
 
+## sample
 x <- rnorm(10000, mean = -2, sd = 3)
+
+## location and scale, radius unknown
 res1 <- roblox(x, returnIC = TRUE)
 checkIC(res1$optIC)
 
@@ -13,10 +16,13 @@
 
 res12 <- roblox(x, returnIC = TRUE, k = 5)
 checkIC(res12$optIC)
-res1
-res11
-res12
 
+roblox(x)
+roblox(x, k = 2)
+roblox(x, k = 5)
+
+
+## location and scale, radius interval
 res2 <- roblox(x, eps.lower = 0.15, eps.upper = 0.3, returnIC = TRUE)
 checkIC(res2$optIC)
 
@@ -25,10 +31,13 @@
 
 res22 <- roblox(x, eps.lower = 0.15, eps.upper = 0.3, returnIC = TRUE, k = 4)
 checkIC(res22$optIC)
-res2
-res21
-res22
 
+roblox(x, eps.lower = 0.15, eps.upper = 0.3)
+roblox(x, eps.lower = 0.15, eps.upper = 0.3, k = 2)
+roblox(x, eps.lower = 0.15, eps.upper = 0.3, k = 4)
+
+
+## scale, radius interval
 res3 <- roblox(x, mean = -2, eps.lower = 0.15, eps.upper = 0.3, returnIC = TRUE)
 checkIC(res3$optIC)
 
@@ -37,10 +46,13 @@
 
 res32 <- roblox(x, mean = -2, eps.lower = 0.15, eps.upper = 0.3, returnIC = TRUE, k = 6)
 checkIC(res32$optIC)
-res3
-res31
-res32
 
+roblox(x, mean = -2, eps.lower = 0.15, eps.upper = 0.3)
+roblox(x, mean = -2, eps.lower = 0.15, eps.upper = 0.3, k = 3)
+roblox(x, mean = -2, eps.lower = 0.15, eps.upper = 0.3, k = 6)
+
+
+## location, radius interval
 res4 <- roblox(x, sd = 3, eps.lower = 0.15, eps.upper = 0.3, returnIC = TRUE)
 checkIC(res4$optIC)
 
@@ -49,10 +61,13 @@
 
 res42 <- roblox(x, sd = 3, eps.lower = 0.15, eps.upper = 0.3, returnIC = TRUE, k = 5)
 checkIC(res42$optIC)
-res4
-res41
-res42
 
+roblox(x, sd = 3, eps.lower = 0.15, eps.upper = 0.3)
+roblox(x, sd = 3, eps.lower = 0.15, eps.upper = 0.3, k = 2)
+roblox(x, sd = 3, eps.lower = 0.15, eps.upper = 0.3, k = 5)
+
+
+## some timings
 system.time(for(i in 1:100) roblox(x, eps = 0.02))
 system.time(for(i in 1:100) roblox(x))
 system.time(for(i in 1:100) roblox(x, k = 2))



More information about the Robast-commits mailing list