1 | bm.pass(s = 0, x = 0, theta = 1, Jst.t = 0.64, Jst.rat = 0.5776972)
|
s |
|
x |
|
theta |
|
Jst.t |
|
Jst.rat |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (s = 0, x = 0, theta = 1, Jst.t = 0.64, Jst.rat = 0.5776972)
{
repeat {
sim <- dev.rej(dev.pr()$X)
if (sim$Acc == 1) {
break
}
}
tau <- s + theta^2 * sim$X
minI <- 2 * rbinom(1, 1, 0.5) - 1
y <- x - theta * minI
list(tau = tau, y = y, minI = minI)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.