bd_simu: Simulation of a linear birth-death-immigration-emigration...

Description Usage Arguments Value See Also Examples

Description

bd_simu simulates afinite statespace birth-death process by returning a possible sequence and a plot about states and time.

Usage

1
bd_simu(BD, time, ini_state, label, graph = TRUE)

Arguments

BD

is an object in class 'stat2003.bd'

time

A numeric scalar and it is the total time that the process will run in this simulation.

ini_state

A string and represents initial state of the process.

label

An integer used to specify the interval between two labels on the y-axis.

graph

Logical. If True the function will also return a states against steps plot, otherwise the function will not return the plot

Value

bd_simu will returns a possible sequence and a plot about states and time.

See Also

stat2003.bd-class A class type of linear birth-death in stat2003 package.

bd_equi will return the equilibrium distribution of a birth-death process

bd_rate will return the generator matrix by given birth-death rates for a linear birth death process.

bd_trans will return the transition matrix by given birth-death rates for a linear birth death process.

Examples

1
2
3
4
A <- new("stat2003.bd", lb = 2, ld = 3, im = 12, em = 10,
          nstate = 30)
bd_simu(A, time = 100,
        ini_state = 5, label = 3)

paulnorthrop/stat2003 documentation built on May 24, 2019, 10:31 p.m.