bern: Bernoulli distribution

Description Usage Arguments Details Value References Examples

Description

Probability mass function and cumulative distribution function of the Bernoulli distribution.

Usage

1
2
dbern(y, prob)
pbern(y, prob)

Arguments

y

a vector of zeros and ones.

prob

probability.

Details

The code relies on the functions dbinom and pbinom with size=1 and log=FALSE.

Value

dbern returns the probability mass function, pbern returns the cumulative distribution function.

References

See the documentation for dbinom and pbinom for more details.

Examples

1
2
dbern(c(0,1),0.4)
pbern(c(0,1),0.4)

PHSMM documentation built on Feb. 9, 2021, 5:07 p.m.

Related to bern in PHSMM...