ph: Create GPH distribution

View source: R/model_ph.R

phR Documentation

Create GPH distribution

Description

Create an instance of GPH

Usage

ph(size, alpha, Q, xi)

Arguments

size

An integer for the number of phases

alpha

A vector of initial probability

Q

An infinitesimal generator

xi

An exit rate vector

Value

An instance of GPH

Note

This function can omit several patterns of arguments. For example, ph(5) omit the arguments alpha, Q and xi. In this case, the default values are assigned to them.

Examples

## 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)))


mapfit documentation built on Nov. 22, 2022, 5:05 p.m.