bm.pass: Brownian motion passage time

Usage Arguments Examples

View source: R/Scale.R

Usage

1
bm.pass(s = 0, x = 0, theta = 1, Jst.t = 0.64, Jst.rat = 0.5776972)

Arguments

s
x
theta
Jst.t
Jst.rat

Examples

 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)
  }

mpoll/scale documentation built on Dec. 9, 2019, 7:15 a.m.