Hi,
I am working with nonnormal data and I need find the right distributions for my data so I can run GLMMs. Does SPSS has a function to analyze the distribution of the data? E.g. Poisson, log, .....I've found countless tutorials for programs but none for SPSS.
Thanks!
Topic
NOTICE: developerWorks Community will be offline May 2930, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
9 replies
Latest Post
 20121129T00:41:09Z by SystemAdmin
ACCEPTED ANSWER
Pinned topic Help  Fitting a distribution to nonnormal data in SPSS
20121120T21:33:36Z

Answered question
This question has been answered.
Unanswered question
This question has not been answered yet.
Updated on 20121129T00:41:09Z at 20121129T00:41:09Z by SystemAdmin

ACCEPTED ANSWER
Re: Help  Fitting a distribution to nonnormal data in SPSS
20121120T21:41:17Z in response to SystemAdminI've now gotten this question from you three times. Once is enough.
Take a look at the QQ plots via Analyze > Descriptive Statistics. You can fit many distributions that way as well as getting a good diagnostic graph, but remember that it's the error term that matters. There is also an extension command, STATS DISTFIT, that can fit distributions in bulk.
HTH,
Jon Peck
ACCEPTED ANSWER
Re: Help  Fitting a distribution to nonnormal data in SPSS
20121121T17:34:21Z in response to SystemAdminThank you!
I didn't realized that all of the separate groups were all answered by yourself. Apologies.
Are you aware of any decent tutorials that can cover the STATS DISTFIT extension command? I have limited experience working with R and even less with SPSS syntax but I am trying to feel my way through it .... with limited success.
ACCEPTED ANSWER
Re: Help  Fitting a distribution to nonnormal data in SPSS
20121121T17:46:31Z in response to SystemAdminI got notified of these postings but don't necessarily answer all.
As for tutorials, you don't need one. Once you install the R Essentials and this extension command, it works just like native Statistics commands, and it has a dialog box interface as well. So you can use it with pointing and clicking and never go near Statistics or R syntax.
You will have to install R and the R Essentials. Regarding the latter, be sure to download and read the installation instructions. The link to the R Essentials can be found from the SPSS Community site by following Downloads for SPSS Statistics.
HTH,
Jon Peck
ACCEPTED ANSWER
Re: Help  Fitting a distribution to nonnormal data in SPSS
20121122T21:20:34Z in response to SystemAdminOk. I have everything installed but unfortunately when I try and a distribution fit I have one of two issues.
1. I receive the the following message and must restart SPSS: "An unknown error has terminated communication with the processor. The SPSS Statistics Processer is unavailable."
2. I receive the message (for several different distributions that I have tried): "Error: An unsupported distribution was specified".
Have you any ideas as to what is going wrong?
Thank you....
ACCEPTED ANSWER
Re: Help  Fitting a distribution to nonnormal data in SPSS
20121123T01:51:58Z in response to SystemAdminYou need to specify what SPSS version and platform you are using.
Post the syntax where you are getting the unknown error message and where you are getting the unsupported distribution message.
And did you try the QQ plots?
ACCEPTED ANSWER
Re: Help  Fitting a distribution to nonnormal data in SPSS
20121123T02:26:06Z in response to SystemAdminHi Jon. I'm working with Windows 7 and running SPSS version 20. I did try the QQ plots (thanks for that) and they worked perfectly. I was just hoping to run the distributions and get some test of Goodness of Fit so I am not relying solely on my qualitative assessment of the plots.
This first syntax simply resulted in an error message while the second crashed the program.
STATS DISTFIT VARIABLE=Sodium
DISTRIBUTION=logistic
/OPTIONS QQPLOT=YES.
Error: An unsupported distribution was specified: logistic
STATS DISTFIT VARIABLE=Sodium
DISTRIBUTION=lognormal
/OPTIONS QQPLOT=YES.
Error: An unsupported distribution was specified: lognormal
ACCEPTED ANSWER
Re: Help  Fitting a distribution to nonnormal data in SPSS
20121123T14:24:31Z in response to SystemAdminLogistic was inadvertently omitted from some of the code. We'll post the fixed version of the command once it has been approved by Legal. You can subscribe to a notification on the file in the Extension Commands Collection to be notified when it has been posted.
As for the problem with lognormal, I can't reproduce it. If the variable has any nonpositive values, that would violate the range requirement for this distribution, and the fit would fail. When I try that, however, I get a message that the distribution could not be fit, and there was no crash. I expect that you are seeing that the startx process terminated, rather than Statistics. Startx (or startx32) is the connection to the R code. Please confirm.
If you can post the dataset you are fitting or send it to me directly (peck AT us.ibm.com), I can see if that shows the problem.
HTH,
Jon Peck
ACCEPTED ANSWER
Re: Help  Fitting a distribution to nonnormal data in SPSS
20121128T18:36:39Z in response to SystemAdminHi Jon,
With the new code I seem to able to run models one at a time (more than that results in a crash). Unfortunately I am now getting 2 error messages (below). What am I doing wrong?
1: In dlogis(x, location, scale, log) : NaNs produced
2: In dlogis(x, location, scale, log) : NaNs produced
3: In function (x, y, ..., alternative = c("two.sided", "less", "greater"), :
cannot compute correct pvalues with ties
STATS DISTFIT VARIABLE=Sodium
DISTRIBUTION=lognormal
/OPTIONS QQPLOT=NO.
Thank you!
ACCEPTED ANSWER
Re: Help  Fitting a distribution to nonnormal data in SPSS
20121129T00:41:09Z in response to SystemAdminThese messages are coming from the R package. The NaN messages can probably be ignored. They are likely due to the iterative numerical algorithm fitting the logistic distribution, and if the parameter estimates look reasonable, the algorithm probably converged.
For the p values message, the algorithm expects continuous data, so ties would be a probability 0 event that it does not handle. If the number of ties is small, I wouldn't worry about the message. If there are a lot of them, then the choice of a logistic distribution is probably wrong anyway.
HTH,
Jon







