cumprob: Calculate cumulative probabilities for state transitions.

Description Usage Arguments Value Examples

Description

This function takes in a vector of probabilities of states transitions and calculate the probability of staying in the original state and output the cumulative probabilities for all possibilities.

Usage

1
cumprob(probs, actual = FALSE)

Arguments

probs

A numeric vector of the probabilities of transition to states.

actual

A logical value, if TRUE, will calculate actual cumulative probabilities which may surpass 1!.

Value

A numeric vector of cumulative probabilites inclusive of the probability of having the same state in the next timestep.

Examples

1
2
3
cumprob(c(.2,.2,.9))
cumprob(c(.2,.2,.9), actual=TRUE)
cumprob(c(.2,.2,.2))

ibmcraftr documentation built on May 1, 2019, 11:31 p.m.