|
Hi Team,
Firstly, we are using SPSS 11.5 in our organization. I know it is pretty old. But we need to work on this version at least for another one more year.
I have a data set which contains more than 1000 records. These records were been collected from 1 company only. In the same i have questions starting from Q1 to Q100. All these questions are 6 point scale questions. And also I have Demographics with D1 and D2.
My task is that, I need to analyse the above data in the following way:. For example, if D1 =1 and if n>5 then i need to calculate the % top2 (5+6 %) scores of the all 100 questions from Q1 to Q100.
If n<5 then i need to ignore the results. In the above case, D1 =2 is having only 3 valid cases and D1 =3 is of 6 valid cases.
From the above data, I have run the custom table syntax and i got the below output
val lab d1
1 "More than 5 years" 2 "Lessthan 5 but greater than 1 year" 3 "Less than 1year". exe. val lab d2
1 "Male" 2 "Female". exe. temp.
recode q1 to q3 (sysmis=sysmis)(5,6=1)(else=0). val lab q1 to q3 1 "% top2 " 0 "others". var lev q1 to q3 d1 d2 (nominal). ctab /tab (q1 + q2 + q3)[colpct f4.0,count] by d1 /tab (q1 + q2 + q3)[colpct f4.0,count] by d2. exe.
And also I tried to use the Aggregate function such as below and I am getting the below
AGGREGATE
/OUTFILE= "abcd" /BREAK=D1 /keep = all /NULL = keep /N_BREAK=N. >Error # 10920 in column 9. Text: ALL
>The definition of a new variable on the AGGREGATE command specifies an >unknown or misspelled function name. The following are valid function >names: FGT, FIN, FIRST, FLT, FOUT, LAST, MAX, MEAN, MEDIAN, MIN, N, NMISS, >NU, NUMISS, PGT, PIN, PLT, POUT, SD and SUM. >This command not executed. >Error # 10920 in column 10. Text: KEEP >The definition of a new variable on the AGGREGATE command specifies an >unknown or misspelled function name. The following are valid function >names: FGT, FIN, FIRST, FLT, FOUT, LAST, MAX, MEAN, MEDIAN, MIN, N, NMISS, >NU, NUMISS, PGT, PIN, PLT, POUT, SD and SUM. In the above syntax I am trying to retain all the variables in a new data file but it is not recognizing the syntax in SPSS 11.5
My Objectives to the Final Output:
1 . In the above output I don't want to display the D1 =2 (n=3) output (high priority)
2. And also if i copy the above result from SPSS to Excel I am getting the decimal points number as well, but i would like the "Column %" numbers to be rounded off to 0 decimal points.
PLEASE SUGGEST ME A MACRO, LOOP OR ANY OTHER WAY TO SOLVE THIS PROBLEM. CONSIDER THIS IS AN URGENT REQUEST.
Thanks in Advance,
Richard
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
What does n mean? number of cases within an id? number of
questions answered? number of questions answered 5 or 6?
Art Kendall Social Research Consultants On 10/3/2010 7:26 AM, Richard AK wrote: ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Kendall,
The n represents number of cases within an id (D1). That means in D1 demographic who responded their years of experience as "Less than 5 but greater than 1 year". And i don't require these people answers to be included in all the questions (q1 to q100) and similarly if you look at the n for demographic D2 and option 2 whose n is 4 (and are females) i don't require these partcipants answers while calculating their %s.
Thanks in advance,
Richard
On Sun, Oct 3, 2010 at 5:24 PM, Art Kendall <[hidden email]> wrote:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It adds a variable to every case with a variable representing how many cases have a particular value of d1. sort cases by d1. aggregate outfile ='c:\project\aggregated.sav' /break = d1 /n_break = n. match files file=* /table= 'c:\project\aggregated.sav' /by= d1. temporary. select if n_break gt 5. or if the n you are interested in is the cell when crossing d1 and d2 sort cases by d1 d2. aggregate outfile ='c:\project\aggregated.sav' /break = d1 d2 /n_break = n. match files file=* /table= 'c:\project\aggregated.sav' /by= d1 d2 temporary. select if n_break gt 5. Art Kendall Social Research Consultants On 10/3/2010 8:04 AM, Richard AK wrote: ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Art Kendall
Social Research Consultants |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Kendall,
It worked for me. Thank you very much for your quick response.
Thanks,
Ajay Atluri
On Sun, Oct 3, 2010 at 6:20 PM, Art Kendall <[hidden email]> wrote:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Free forum by Nabble | Edit this page |
