fit_flips: Fit the Stopped Negative Binomial Distribution

Description Usage Arguments Examples

View source: R/snb_stat.r

Description

Fit a vector of zero's and ones according to the stopped negative binomial distribution with specified 's' and 't' parameters and a beta prior.

Usage

1
fit_flips(x, s, t, prior = c(0.5, 0.5))

Arguments

x

The vector of 1's and 0's to fit.

s

The ceiling for the snb process.

t

The right barrier for the snb process.

prior

The two element vector giving the parameters for the beta prior.

Examples

1
2
3
# Fit a hypthetical trial.
trial = c(0, 0, 0, 0, 1, 0, 0)
summary(fit_flips(trial, s=2, t=6))

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