A function to generate an object of `cf1`

.

1 |

`size` |
a value for the number of phases. |

`alpha` |
a vector for the initial probabilities of PH distribution. |

`rate` |
a vector for transition rates to next phase (diagonal elements of Q). |

`class` |
name of Matrix class for |

The PH distribution with parameters *α*, *Q* and *ξ = - Q 1*:
Cumulative probability function;

*F(q) = 1 - α \exp( Q q ) 1*

Probability density function;

*f(x) = α \exp( Q x ) ξ,*

where *Q* is a bidiagonal matrix whose entries are sorted.

`cf1`

gives an object of canonical form 1 that is a subclass of PH distribution.

`rph`

is a generic function and is specified for `cf1`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
## create a CF1 with 5 phases
(param1 <- cf1(5))
## create a CF1 with 5 phases
(param1 <- cf1(size=5))
## create a CF1 with specific parameters
(param2 <- cf1(alpha=c(1,0,0), rate=c(1.0,2.0,3.0)))
## p.d.f. for 0, 0.1, ..., 1
(dph(x=seq(0, 1, 0.1), ph=param2))
## c.d.f. for 0, 0.1, ..., 1
(pph(q=seq(0, 1, 0.1), ph=param2))
## generate 10 samples (this is quiker than rph with general ph)
(rph(n=10, ph=param2))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.