# Package 'ExGaussEstim'

Yousri Slaoui, Abir El Haj, Alandra Zakkour, Caroline Bordes, Cyril Perret, Jean Dumoncel

<figure><img src="image_1.png" /></figure>

## To cite this version:

Yousri Slaoui, Abir El Haj, Alandra Zakkour, Caroline Bordes, Cyril Perret, et al.. Package 'ExGaussEstim'./, 2023. hal-04269036

HAL Id: hal-04269036

https://hal.science/hal-04269036v1

Submitted on 3 Nov 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>
# Package ‘ExGaussEstim’

October 6, 2023

**Title** Quantile Maximization Likelihood Estimation and Bayesian Ex-Gaussian Estimation

**Version** 0.1.2

**Description** Presents two methods to estimate the parameters 'mu', 'sigma', and 'tau' of an ex-Gaussian distribution. Those methods are Quantile Maximization Likelihood Estimation ('QMLE') and Bayesian. The 'QMLE' method allows a choice between three different estimation algorithms for these parameters : 'eldermead' ('NEMD'), 'fminsearch' ('FMIN'), and 'nlminb' ('NLMI'). For more details about the methods you can refer at the following list: Brown, S., & Heathcote, A. (2003) <doi:10.3758/BF03195527>; McCormack, P. D., & Wright, N. M. (1964) <doi:10.1037/h0083285>; Van Zandt, T. (2000) <doi:10.3758/BF03214357>; El Haj, A. C. (2021) <doi:10.19139/soic-2310-5070-1251>; Gilks, W. R., Best, N. G., & Tan, K. K. C. (1995) <doi:10.2307/2986138>.

**License** GPL-2

**Encoding** UTF-8

**LazyLoad** true

**RoxygenNote** 7.2.3

**Imports** pracma, stats, nloptr, invgamma, dlm, fitdistrplus, gamlss.dist

**NeedsCompilation** no

**Suggests** testthat (>= 3.0.0)

**Config/testthat/edition** 3

**Author** Yousri SLAOUI [aut] (<https://orcid.org/0000-0001-5295-3311>), Abir EL HAJ [aut, ctb] (<https://orcid.org/0000-0003-3210-9097>), Alandra ZAKKOUR [aut], Caroline BORDES [aut, ctb], Cyril PERRET [aut] (<https://orcid.org/0000-0002-4552-9093>), Jean DUMONCEL [aut, cre] (<https://orcid.org/0000-0003-0789-7458>)

**Maintainer** Jean DUMONCEL <jean.dumoncel@univ-poitiers.fr>

**Repository** CRAN

**Date/Publication** 2023-10-06 07:20:02 UTC
## R topics documented:

<table><tr><td>BayesianExgaussian</td><td>2</td></tr><tr><td>QMLEEstim</td><td>3</td></tr></table>

## Index 5

BayesianExgaussian Bayesian Ex-gaussian Estimate

### Description

Estimates the mu, sigma, and tau parameters of an ex-Gaussian distribution using a bayesian method.

### Usage

BayesianExgaussian(n, x, nSamples = 5000, Ti = 2500)

### Arguments

n the data size

x the data. Must be a vector, with no missing values

nSamples number of Samples

Ti burn-in

### Value

BayesianExgaussian() returns an object "theta" which is a list with components: estimates of mu, sigma, and tau

### References

Brown, S., & Heathcote, A. (2003). QMLE: Fast, robust, and efficient estimation of distribution functions based on quantiles. *Behavior Research Methods, Instruments, & Computers*, **35**, 485-492.

McCormack, P. D., & Wright, N. M. (1964). The positive skew observed in reaction time distributions. *Canadian Journal of Psychology/Revue canadienne de psychologie*, **18**, 43-51.

Van Zandt, T. (2000). How to fit a response time distribution. *Psychonomic Bulletin & Review*, **7**, 424-465.

El Haj, A., Slaoui, Y., Solier, C., & Perret, C. (2021). Bayesian Estimation of The Ex-Gaussian distribution. *Statistics, Optimization & Information Computing*, **9(4)**, 809-819.

Gilks, W. R., Best, N. G., & Tan, K. K. C. (1995). Adaptive rejection Metropolis sampling within Gibbs sampling. *Journal of the Royal Statistical Society: Series C (Applied Statistics)*, **44**, 455-472.
Examples

```r
library(gamlss.dist)
set.seed(2703)
data<-rexGAUS(n=100, mu = 500, sigma = 150, nu = 100)
BayesianExgaussian(n = 100, x = data)
```

QMLEEstim

Ex-Gaussian Quantile Maximum Likelihood Estimate

Description

Estimates the mu, sigma, and tau parameters of an ex-Gaussian distribution. 3 different algorithms can be used: neldermead ('NEMD'), fminsearch ('FMIN') and nlminb ('NLMI').

Usage

QMLEEstim(y, func)

Arguments

y the data. Must be a vector with no missing values

func the function selected for the estimation. 'NEMD' for neldermead, 'FMIN' for fminsearch, and 'NLMI' for nlminb.

Value

QMLEEstim() returns an object "valEstim" which is a list with components: estimates of mu, sigma, and tau

References

Brown, S., & Heathcote, A. (2003). QMLE: Fast, robust, and efficient estimation of distribution functions based on quantiles. *Behavior Research Methods, Instruments, & Computers*, **35**, 485-492.

McCormack, P. D., & Wright, N. M. (1964). The positive skew observed in reaction time distributions. *Canadian Journal of Psychology/Revue canadienne de psychologie*, **18**, 43-51.

Van Zandt, T. (2000). How to fit a response time distribution. *Psychonomic Bulletin & Review*, **7**, 424-465.

El Haj, A., Slaoui, Y., Solier, C., & Perret, C. (2021). Bayesian Estimation of The Ex-Gaussian distribution. *Statistics, Optimization & Information Computing*, **9**(4), 809-819.

Gilks, W. R., Best, N. G., & Tan, K. K. C. (1995). Adaptive rejection Metropolis sampling within Gibbs sampling. *Journal of the Royal Statistical Society: Series C (Applied Statistics)*, **44**, 455-472.
Examples

```r
library(gamlss.dist)
set.seed(2703)
data<-rexGAUS(n=100, mu = 500, sigma = 150, nu = 100)
QMLEEstim(data, 'NEMD')
```
Index

BayesianExgaussian, 2

QMLEEstim, 3