|
Hi guys,
Thank you in advance for your help. I am trying to do some calculations between aggregate statistics in SPSS 12. What I need to do: Step 1. To calculate frequencies (%) for selected values of some variables applying different filters. Step 2. Using the set of previously calculated frequencies (in step 1) to do then some basic mathematical calculations BETWEEN THEM (for instance frequency 1 * frequency 2 - frequency 3 / frequency 4 ...) and then output results in a table format. I used cycles and scratch variables for step 1 and step 2 and it seems to work properly, but I cannot OUTPUT even show these scratch variables on my display because many SPSS commands don't accept scratch variables at all. You could probably suggest me to do something like this: compute new_var1=#scratch_var1. ÑÑÑв after that use output commands... But I am trying to get rid of creating new "hard" variables and saving scratch variables in the dataset because of the following reasons: 1. Resulting scratch variables will be AGGREGATE statistics and have nothing to do with each case/row. 2. Numbers of these scratch variables could be really big = 100x12. Could you tell me how I can output (show, print, display or plot) these 100x12 scratch variables? Or should I use a different approach? Thanks.. |
|
Partial solution, I think.
At 03:24 PM 6/10/2007, Alex wrote: >I am trying to do some calculations between aggregate statistics in >SPSS 12: > >Step 1. To calculate frequencies (%) for selected values of some >variables applying different filters. > >Step 2. Using the set of previously calculated frequencies (in step 1) >to do then some basic mathematical calculations BETWEEN THEM (for >instance frequency 1 * frequency 2 - frequency 3 / frequency 4 ...) >and then output results in a table format. > >I used cycles and scratch variables for step 1 and step 2, but I >cannot OUTPUT even show these scratch variables on my display because >many SPSS commands don't accept scratch variables at all. > >You could probably suggest me to do something like this: >. compute new_var1=#scratch_var1. ... after that use output >commands... But I am trying to get rid of creating new "hard" >variables and saving [them] in the dataset because of the following >reasons: > >1. Resulting scratch variables will be AGGREGATE statistics and have >nothing to do with each case/row. > >2. Numbers of these scratch variables could be really big = 100x12. > >Could you tell me how I can output (show, print, display or plot) >these 100x12 scratch variables? Or should I use a different approach? Here are things that *might* work for you: Step 1. use AGGREGATE - it sounds like you're not doing that now. But don't use MODE=ADDVARIABLES; write to a separate file. You can use OUTFILE=*, which is often convenient, but remember this *wipes out the original working file*. Make sure you have a saved copy. It does not put the aggregated variables in the original file. Depending on how your original file is grouped; that is, what BREAK variables you use for AGGREGATE; you may have as few as one record in the aggregated file. (To AGGREGATE a file down to one record, use COMPUTE NOBREAK = 1. AGGREGATE OUTFILE=* /BREAK=NOBREAK / etc. Step 2: Compute as you were planning to, but on the regular variables in the AGGREGATEd file. Step 3: Write out tables, etc., as you were planning to. NOW, there may well be reasons this doesn't give you what you need. So ask again, saying as clearly as you can what you want, and how it differs from this. -Good luck, Richard |
| Free forum by Nabble | Edit this page |
