Tricks and Traps for Young Players
Ray D Brownrigg
Statistical Computing Manager School of Mathematics, Statistics and Computer Science Victoria University of Wellington Wellington, New Zealand
Tricks and Traps for Young Players Ray D Brownrigg Statistical - - PowerPoint PPT Presentation
Tricks and Traps for Young Players Ray D Brownrigg Statistical Computing Manager School of Mathematics, Statistics and Computer Science Victoria University of Wellington Wellington, New Zealand ray@mcs.vuw.ac.nz UseR! 2008 Dortmund, August
Statistical Computing Manager School of Mathematics, Statistics and Computer Science Victoria University of Wellington Wellington, New Zealand
1
2
3
s t z
Example plot of ξn(s, t)
* * * * * * * * * * s t z − nst
Example plot of ξn(s, t) − nst
*
4
5
1e+02 1e+03 1e+04 1e+05 1e+06 1e−02 1e+00 1e+02 1e+04 length CPU time a A f h k m V
5000
Algorithm performance
6
7
8
Histogram of normals, standard size
rnorm(1000) Frequency −3 −2 −1 1 2 3 50 100 150
Histogram of normals, small size
rnorm(1000) Frequency −3 −2 −1 1 2 3 50 100 150
9
1 2 3 4 0.0 0.2 0.4 0.6 0.8 1.0
2D edfs for m = 50K
x edf(x) n=50 n=100 n=1000 n=10000 n=50000 n=100000 n=100K, m=100K
10
2.0 2.2 2.4 2.6 2.8 3.0 0.75 0.80 0.85 0.90 0.95 1.00
2D edfs for m = 50K
x edf(x) n=50 n=100 n=1000 n=10000 n=50000 n=100000 n=100K, m=100K
11
12
13
14
x
15
16
17
18
19
20
6.0 6.2 6.4 6.6 6.8 7.0 260 300 340 380 x g1 (x) 6.0 6.2 6.4 6.6 6.8 7.0 6.2 6.4 6.6 6.8 7.0 x a (x)
21
6.0 6.2 6.4 6.6 6.8 7.0 −0.982 −0.981 −0.980 −0.979 −0.978 −0.977 −0.976 x x * a(x) − a(x)^2
22
23
6.0 6.2 6.4 6.6 6.8 7.0 −0.982 −0.981 −0.980 −0.979 −0.978 −0.977 −0.976 x x * a(x) − a(x)^2
24
25
26
27
28
29
30
> arr <- sample(1:24) > dim(arr) <- 4:2 > arr , , 1 [,1] [,2] [,3] [1,] 5 14 7 [2,] 19 16 4 [3,] 8 24 1 [4,] 18 20 6 , , 2 [,1] [,2] [,3] [1,] 22 13 12 [2,] 15 9 21 [3,] 17 10 23 [4,] 2 3 11 >
31
> toolarge <- which(arr > 20, arr.ind = TRUE) > toolarge dim1 dim2 dim3 [1,] 3 2 1 [2,] 1 1 2 [3,] 2 3 2 [4,] 3 3 2 > > arr[toolarge] <- NA > arr , , 1 [,1] [,2] [,3] [1,] 5 14 7 [2,] 19 16 4 [3,] 8 NA 1 [4,] 18 20 6 , , 2 [,1] [,2] [,3] [1,] NA 13 12 [2,] 15 9 NA [3,] 17 10 NA [4,] 2 3 11 >
32
33
34
35
36