Learn R Programming

mapfit (version 0.9.7)

cf1-class: Class of canonical form 1 (PH distribution)

Description

Parameters for a canonical form 1 which is a subclass of PH. This is extended from '>ph.

Arguments

Objects from the Class

Objects are usually created by a cf1.

Slots

rate:

transition rates to the next phase.

The following slots are inherited from '>ph:

size:

the number of phases (transient states).

alpha:

a probability (row) vector to decide an initial phase.

Q:

a square matrix that means transition rates between phases.

xi:

a column vector for exiting rates from phases to an absorbing state.

df:

the number of free parameters.

Methods

ph.moment

signature(ph = "cf1"): ...

% \item{emfit.init}{\code{signature(model = "cf1")}: ... } % \item{emfit.mstep}{\code{signature(model = "cf1")}: ... }

See Also

Classes '>ph and '>herlang.

Examples

Run this code
# NOT RUN {
## 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))

# }

Run the code above in your browser using DataLab