zplot: Simulate the binomial process

Description Usage Arguments Examples

View source: R/snb_dist.r

Description

Generate coin flip trajectories that stop after either s heads or t tails.

Usage

1
2
zplot(flips, s, t, show_arrows = TRUE, unif_jitter = 0.2, xlab = NULL,
  ylab = NULL)

Arguments

flips

the sequence of coing flips (1's and 0's) to visualize. Note that this can be a list in which case multiple processes will be shown.

s

the number of heads to stop at.

t

the number of tails to stop at.

show_arrows

should arrows be shown in the Bernoullis process path?

unif_jitter

for multiple flip paths, how much jitter to add (default is 0.2).

xlab

the name of the x axis.

ylab

the name of the y axis.

n

the number of trajectories to simulate.

prob

the probability of a head.

drop

if TRUE then return the results as a matrix. Otherwise return as a list. The Z-Plot for the Binomial Process

Visualize the stopped Bernoulli process with horizontal axis counting successes and vertical axis counting failure.

s

the top barrier for the Bernoulli process.

t

the right barrier for the Bernoulli process.

Examples

1
2
flips = c(0, 0, 1)
zplot(flips, 2, 3)

kaneplusplus/snb documentation built on May 20, 2019, 7:20 a.m.