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
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.
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
See "Maximum likelihood estimation in 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.
See also "Two simple ways to construct a log-likelihood function 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?
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.
For more information about the CDF in SAS, see "Four essential functions for statistical programmers."
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.