Learn R Programming

mapfit (version 0.9.7)

mapfit-package: PH/MAP parameter estimation tool

Description

Estimation methods for phase-type distribution (PH) and Markovian arrival process (MAP) from empirical data (point and grouped data) and density function.

Arguments

Details

Package: mapfit
Type: Package
Version: 0.9.7
Date: 2015-03-24
License: GPL (>= 2)
LazyLoad: yes

See Also

phfit.point phfit.group phfit.density phfit.3mom mapfit.point mapfit.group

Examples

Run this code
# NOT RUN {
### PH fitting with grouped data
## make sample
wgroup <- hist(x=rweibull(n=100, shape=2, scale=1),
	           breaks="fd", plot=FALSE)

## PH fitting for CF1
phfit.group(ph=cf1(2), counts=wgroup$counts,
            breaks=wgroup$breaks)

## PH fitting for hyper Erlang
phfit.group(ph=herlang(3), counts=wgroup$counts,
            breaks=wgroup$breaks)

### MAP fitting with point data
data(BCpAug89)
BCpAug89s <- head(BCpAug89, 50)

## MAP fitting for ER-HMM (fast estimation algorithm)
mapfit.point(map=erhmm(3), x=cumsum(BCpAug89s))


### MAP fitting with grouped data
## make grouped data
BCpAug89.group <- hist(cumsum(BCpAug89s),
                       breaks=seq(0, 0.15, 0.005),
                       plot=FALSE)

## MAP fitting with approximate MMPP
mapfit.group(map=gmmpp(2),
             counts=BCpAug89.group$counts,
             breaks=BCpAug89.group$breaks)

# }

Run the code above in your browser using DataLab