wienerdist {RWiener}R Documentation

Wiener process distribution functions

Description

dwiener computes the wiener first passage time density. pwiener computes the CDF for the wiener first passage time density. qwiener computes the quantile for a given CDF value. rwiener generates random quantiles from a wiener process distribution, based on the rejection based method. For all functions, the standard deviation of the diffusion process is fixed to 1.

Usage

  dwiener(q, alpha,tau,beta,delta, resp="upper", give_log=FALSE)
  pwiener(q, alpha,tau,beta,delta, resp="upper")
  qwiener(p, alpha,tau,beta,delta, resp="upper")
  rwiener(n, alpha,tau,beta,delta)

Arguments

q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

alpha

boundary separation parameter.

tau

non-decision time parameter.

beta

bias parameter.

delta

drift rate parameter.

resp

respone: "upper", "lower", or "both"

give_log

function returns log, if this argument is TRUE

References

Wabersich, D., & Vandekerckhove, J. (2014). The RWiener package: An R package providing distribution functions for the Wiener diffusion model. The R Journal, 6(1), 49-56.

Examples

## calculate density for reactiontime 1.45, upper bound and some parameters
dwiener(1.45, 2,0.3,0.5,0)

## calculate CDF for reactiontime 1.45, upper bound and some parameters
pwiener(1.45, 2,0.3,0.5,0)

## calculate quantile for CDF value of 0.5, upper bound and some parameters
qwiener(0.5, 2,0.3,0.5,0)

## generate one random value
rwiener(1, 2,0.3,0.5,0)

[Package RWiener version 1.3-3 Index]