Calcite | Level 5

## Predicting Ex-Gaussian Parameters in SAS

Hello all,

I am analyzing some reaction time data, and I am attempting to do a more sophisticated analysis than simply transforming the data to reduce skew. A lot of current work recommends using the ex-Gaussian distribution as it more accurately captures the shape of the data. The ex-Gaussian is a convolution of the Gaussian and an exponential distributions. so essentially normal with a long positive skew.

The distribution is described by three parameters, mu, sigma, and tau, which are the mean and SD of the Gaussian portion, and the third parameter describes the mean of the exponential component. The below paper describes a toolbox for MATLAB that estimates these parameters based on inputted data, as well as some other fun things.

https://www.tqmp.org/RegularArticles/vol04-1/p035/p035.pdf

My question is, is there any way to do this in SAS? I can't find any literature on implementing ex-Gaussian distributions in SAS, or on how to estimate these parameters. I'm wondering if anyone here has some insight.

-David

5 REPLIES 5
Super User

## Re: Predicting Ex-Gaussian Parameters in SAS

PROC NLIN could do it.

And I have feeling SAS/IML also could get it .

Calling @Rick_SAS

SAS Employee

## Re: Predicting Ex-Gaussian Parameters in SAS

Yes, NLIN would be a good way to do this. I implemented this distribution in JMP for a customer and was done with a nonlinear model.

SAS Super FREQ

## Re: Predicting Ex-Gaussian Parameters in SAS

The PROC IML syntax is very similar to MATLAB, so you could use the existing paper to write the log-likelihood and then use SAS/IML

If you don't have a license for SAS/IML, you can use PROC NLMIXED to set up and maximize the log-likelihood function.

Calcite | Level 5

## Re: Predicting Ex-Gaussian Parameters in SAS

Thanks, @Rick_SAS .I'm actually having the most trouble deciphering the Phi symbol in the formula, or how to implement it in SAS. Do you have advice on this one? It states that is is the cumulative distribution of the Gaussian function. Does SAS have a built in for this mathematical computation?

SAS Super FREQ

## Re: Predicting Ex-Gaussian Parameters in SAS

Capital Phi is a standard symbol that indicates the cumulative nornal distribution function. You can use the CDF function in SAS

to evaluate the cumulative normal distribution. The syntax is

c = CDF("Normal", x, mu, sigma);

Then c represents the probability that a random draw from the N(mu, sigma) distribution is less than x.