Hello all,
I have question about calculating dimension percents for a group of questions, across cases with missing values. Below is a sample dataset for Dimension 1, comprised for 4 questions. 1= Unfavorable, 2 = Neutral, and 3 = Favorable. Is there a custom table that can summarize these 4 variables into a single value, ignoring the missing values? q1 q2 q3 q4 . . 1 1 1 . . . 3 3 2 3 3 3 3 1 2 2 2 1 3 1 3 3 3 3 3 3 3 2 1 3 1 3 3 1 3 3 3 3 The way we typically calculate these percents is through Excel formulas. We past this data into excel, we then sum the frequency (count in SPSS) all the 1s 2s and 3s and divide each by the total. In this example, the percents would be as follows: Unfav Neu Fav Total counts 9 5 21 35 percents 0.257 0.14 0.6 Is there any way to do this in SPSS? Thanks so much in advance if you have a solution to this time-consuming problem!! Laura Leach |
Hi Laura,
Try this: *** Aggregates cases to calculate percentages for each response option . COMPUTE alldata = 1 . AGGREGATE /OUTFILE='c:\agg.sav' /BREAK=alldata /q1_u= PIN(q1 1 1) /q2_u= PIN(q2 1 1) /q3_u= PIN(q3 1 1) /q4_u= PIN(q4 1 1) /q1_n= PIN(q1 2 2) /q2_n= PIN(q2 2 2) /q3_n= PIN(q3 2 2) /q4_n= PIN(q4 2 2) /q1_f= PIN(q1 3 3) /q2_f= PIN(q2 3 3) /q3_f= PIN(q3 3 3) /q4_f= PIN(q4 3 3). *** Computes the dimension scores . GET FILE='C:\agg.sav'. COMPUTE DIM1_FAV = MEAN(q1_f to q4_f) . COMPUTE DIM1_NEU = MEAN(q1_n to q4_n) . COMPUTE DIM1_UNF = MEAN(q1_u to q4_u) . EXE . Hope that's what you were looking for. Best, --Justin Black On 8/22/06, Laura Leach <[hidden email]> wrote: > > Hello all, > > I have question about calculating dimension percents for a group of > questions, across cases with missing values. > > Below is a sample dataset for Dimension 1, comprised for 4 questions. 1= > Unfavorable, 2 = Neutral, and 3 = Favorable. Is there a custom table that > can summarize these 4 variables into a single value, ignoring the missing > values? > > > q1 q2 q3 q4 > . . 1 1 > 1 . . . > 3 3 2 3 > 3 3 3 1 > 2 2 2 1 > 3 1 3 3 > 3 3 3 3 > 3 2 1 3 > 1 3 3 1 > 3 3 3 3 > > > The way we typically calculate these percents is through Excel formulas. > We past this data into excel, we then sum the frequency (count in SPSS) > all > the 1s 2s and 3s and divide each by the total. In this example, the > percents would be as follows: > > Unfav Neu Fav Total > counts 9 5 21 35 > percents 0.257 0.14 0.6 > > Is there any way to do this in SPSS? Thanks so much in advance if you > have > a solution to this time-consuming problem!! > > Laura Leach > |
In reply to this post by Laura Leach
This should work for you.
GET FILE = 'Type file name here' . Value Labels /q1 to q4 1 "Unfavorable" 2 "Neutral" 3 "Favorable". VARSTOCASES /MAKE Dimension FROM Q1 TO Q4 . FREQ Dimension. ********Out put *********** Dimension Frequency Percent Valid Percent Cumulative Percent Valid Unfavorable 9 25.7 25.7 25.7 Neutral 5 14.3 14.3 40.0 Favorable 21 60.0 60.0 100.0 Total 35 100.0 100.0 Edward. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of Laura Leach Sent: Tuesday, August 22, 2006 1:49 PM To: [hidden email] Subject: Calculating percents for a dimension Hello all, I have question about calculating dimension percents for a group of questions, across cases with missing values. Below is a sample dataset for Dimension 1, comprised for 4 questions. 1= Unfavorable, 2 = Neutral, and 3 = Favorable. Is there a custom table that can summarize these 4 variables into a single value, ignoring the missing values? q1 q2 q3 q4 . . 1 1 1 . . . 3 3 2 3 3 3 3 1 2 2 2 1 3 1 3 3 3 3 3 3 3 2 1 3 1 3 3 1 3 3 3 3 The way we typically calculate these percents is through Excel formulas. We past this data into excel, we then sum the frequency (count in SPSS) all the 1s 2s and 3s and divide each by the total. In this example, the percents would be as follows: Unfav Neu Fav Total counts 9 5 21 35 percents 0.257 0.14 0.6 Is there any way to do this in SPSS? Thanks so much in advance if you have a solution to this time-consuming problem!! Laura Leach |
If you think of these 4 variables as a multiple response set, then you can tabulate counts and percents (using responses as the base) in the old MULT RESPONSE procedure, the old TABLES procedure, or Custom Tables. People often overlook what the reporting procedures can do and opt for file transformation approaches.
________________________________ From: SPSSX(r) Discussion on behalf of Edward Boadi Sent: Tue 8/22/2006 3:20 PM To: [hidden email] Subject: Re: Calculating percents for a dimension This should work for you. GET FILE = 'Type file name here' . Value Labels /q1 to q4 1 "Unfavorable" 2 "Neutral" 3 "Favorable". VARSTOCASES /MAKE Dimension FROM Q1 TO Q4 . FREQ Dimension. ********Out put *********** Dimension Frequency Percent Valid Percent Cumulative Percent Valid Unfavorable 9 25.7 25.7 25.7 Neutral 5 14.3 14.3 40.0 Favorable 21 60.0 60.0 100.0 Total 35 100.0 100.0 Edward. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of Laura Leach Sent: Tuesday, August 22, 2006 1:49 PM To: [hidden email] Subject: Calculating percents for a dimension Hello all, I have question about calculating dimension percents for a group of questions, across cases with missing values. Below is a sample dataset for Dimension 1, comprised for 4 questions. 1= Unfavorable, 2 = Neutral, and 3 = Favorable. Is there a custom table that can summarize these 4 variables into a single value, ignoring the missing values? q1 q2 q3 q4 . . 1 1 1 . . . 3 3 2 3 3 3 3 1 2 2 2 1 3 1 3 3 3 3 3 3 3 2 1 3 1 3 3 1 3 3 3 3 The way we typically calculate these percents is through Excel formulas. We past this data into excel, we then sum the frequency (count in SPSS) all the 1s 2s and 3s and divide each by the total. In this example, the percents would be as follows: Unfav Neu Fav Total counts 9 5 21 35 percents 0.257 0.14 0.6 Is there any way to do this in SPSS? Thanks so much in advance if you have a solution to this time-consuming problem!! Laura Leach |
In reply to this post by Laura Leach
WOW! Thank you SOO much! I tried it on the real dataset and it worked to
the 10th decimal!!!!! I wish I had asked months ago, before I did hundreds of reports by hand to bypass SPSS! Thank you thank you THANK YOU!!!!! Laura On Tue, 22 Aug 2006 16:20:53 -0400, Edward Boadi <[hidden email]> wrote: >This should work for you. > >GET FILE = 'Type file name here' . > >Value Labels >/q1 to q4 >1 "Unfavorable" >2 "Neutral" >3 "Favorable". > >VARSTOCASES /MAKE Dimension FROM Q1 TO Q4 . > >FREQ Dimension. > > >********Out put *********** >Dimension > Frequency Percent Valid Percent >Valid Unfavorable 9 25.7 25.7 25.7 > Neutral 5 14.3 14.3 40.0 > Favorable 21 60.0 60.0 100.0 > Total 35 100.0 100.0 > > >Edward. > |
Free forum by Nabble | Edit this page |