From the gamlss.dist page for exGAUSS
:
re is how we're supposed to estimate the parameters:
library(gamlss)
y <- rexGAUS(100, mu = 300, nu = 100, sigma = 35)
m1 <- gamlss(y ~ 1, family = exGAUS)
m1
Unfortunately the estimates are way off:
Family: c("exGAUS", "ex-Gaussian")
Fitting method: RS()
Call: gamlss(formula = y ~ 1, family = exGAUS)
Mu Coefficients:
(Intercept)
302.9
Sigma Coefficients:
(Intercept)
3.496
Nu Coefficients:
(Intercept)
4.63
A package that has disappeared from CRAN, retimes, can still be installed from
https://cran.r-project.org/src/contrib/Archive/retimes/retimes_0.1-2.tar.gzIt has a function
mexgauss
:
library(retimes)
mexgauss(y)
gives:
mu sigma tau
319.42880 55.51562 85.94403
which is closer.
