Learn R Programming

mapfit (version 1.0.0)

ph: Create GPH distribution

Description

Create an instance of GPH

Usage

ph(size, alpha, Q, xi)

Value

An instance of GPH

Arguments

size

An integer for the number of phases

alpha

A vector of initial probability

Q

An infinitesimal generator

xi

An exit rate vector

Examples

Run this code
## create a PH (full matrix) with 5 phases
(param1 <- ph(5))

## create a PH (full matrix) with 5 phases
(param1 <- ph(size=5))

## create a PH with specific parameters
(param2 <- ph(alpha=c(1,0,0),
              Q=rbind(c(-4,2,0),c(2,-5,1),c(1,0,-1)),
              xi=c(2,2,0)))

Run the code above in your browser using DataLab