aggregatespsskurtosis

SPSS: Equivalent of aggregate that works for kurtosis?


I'm trying to group a dataset by year and then get the kurtosis for each year so that I can see if it's increasing or decreasing over the course of the year. Aggregate works for means (which is nice, and yields the data I want), it DOESN'T seem to work for Kurtosis. While some online documentation suggests that it should, the documentation I get when I use the in software help that it doesn't, as does my compiler.

I guess this really means there's two questions:

1) Is there some version of SPSS this works in?

2) If not, what can I replace it with that will give me similar results?

Thanks for your time.

Edit: I was a little unclear here: I want to run a regression model to see if / how much it's increasing yearly, which means that I need some way of getting access to the data for doing a regression, so just running the kurtosis function won't quite get me the data I need.


Solution

  • It's easy enough to get the kurtosis in the output window, like this:

    means YourVar by year/cells mean kurt.
    

    But if you want to work with the results in a dataset, you need to capture it from the output (no kurtosis calculation in the aggregate command):

    DATASET DECLARE  AggData.
    OMS   /SELECT TABLES   /IF COMMANDS=['Means'] SUBTYPES=['Report']
      /DESTINATION FORMAT=SAV NUMBERED=TableNumber_    OUTFILE='AggData' VIEWER=YES.
    means YourVar by year/cells mean kurt.
    omsend.
    dataset activate AggData.
    
    * at this point you have a new dataset with the means and the kurtosis. 
      Just a bit of cleaning up.
    
    delete vars TableNumber_ Command_ Subtype_ Label_.
    rename vars var1=year var2=varname.
    

    This will work well with one variable, and you can add other statistics as well. Note though that you can also add more variables but then the dataset will need some restructuring (using casestovars).