SCM

SCM Repository

[rmetrics] View of /pkg/randtoolbox/tests/test-sobol-Ccode.R
ViewVC logotype

View of /pkg/randtoolbox/tests/test-sobol-Ccode.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6136 - (download) (annotate)
Tue Apr 30 12:56:05 2019 UTC (7 weeks, 2 days ago) by dutangc
File size: 536 byte(s)
remove old URL, update argument checking, disable sscanf for a CRAN release
library(randtoolbox)

p13 <- int2bit(13)
prevterm <- sapply(c(1,3,3), int2bit)

#page 307 of Glassermann
trueval <- c(16, 24,  8, 12, 28, 20,  4, 30, 14,  6, 22, 18,  2, 10, 26,  5, 21, 29, 13,  9, 25, 17,  1, 27, 11,  3, 19, 23,  7, 15, 31)/32
cbind(sobol.basic(31, p13, 3, prevterm, echo=FALSE, output="r") , trueval)


sobol.directions(p13, 3, sapply(c(1,1,1), int2bit), 0, echo=FALSE)
sobol.directions(p13, 3, sapply(c(1,3,5), int2bit), 0, echo=FALSE)
sobol.directions(p13, 3, sapply(c(1,1,7), int2bit), 0, echo=FALSE)

sobol(2, 3)

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge