# phfit.3mom: PH fitting with three moments In mapfit: A Tool for PH/MAP Parameter Estimation

## Description

estimates PH parameters from three moments.

## Usage

 ```1 2``` ```phfit.3mom(m1, m2, m3, method = c("Osogami06", "Bobbio05"), max.phase = 50, epsilon = sqrt(.Machine\$double.eps)) ```

## Arguments

 `m1` a value of the first moment. `m2` a value of the second moment. `m3` a value of the third moment. `method` the name of moment matching method. `max.phase` an integer for the maximum number of phases in the method "Osogami06". `epsilon` a value of precision in the method "Osogami06".

## Value

returns an object of S4 class of general PH `ph`.

## Note

The method "Osogami06" checks the first three moements on whether there exists a PH whose three moements match to them. In such case, the method "Bobbio05" often returns an error.

## References

Osogami, T. and Harchol-Balter, M. (2006) Closed Form Solutions for Mapping General Distributions to Minimal PH Distributions. Performance Evaluation, 63(6), 524–552.

Bobbio, A., Horvath, A. and Telek, M. (2005) Matching Three Moments with Minimal Acyclic Phase Type Distributions. Stochastic Models, 21(2-3), 303–326.

`ph`, `ph.moment`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19``` ```## Three moment matching ## Moments of Weibull(shpape=2, scale=1); (0.886227, 1.0, 1.32934) (result1 <- phfit.3mom(0.886227, 1.0, 1.32934)) ## Three moment matching ## Moments of Weibull(shpape=2, scale=1); (0.886227, 1.0, 1.32934) (result2 <- phfit.3mom(0.886227, 1.0, 1.32934, method="Bobbio05")) ## mean ph.mean(result1) ph.mean(result2) ## variance ph.var(result1) ph.var(result2) ## up to 5 moments ph.moment(5, result1) ph.moment(5, result2) ```