Learn R Programming

mapfit (version 0.9.9)

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

Slots

rate

Transition rates to the next phase.

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.

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