From the gamlss.dist page for exGAUSS
:
The ex-Gaussian distribution is often used by psychologists to model response time (RT). It is defined by adding two random variables, one from a normal distribution and the other from an exponential. The parameters
mu
andsigma
are the mean and standard deviation from the normal distribution variable while the parameternu
is the mean of the exponential variable.
Here 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.