|
Hi ,
I posted the orignal question to the list last week under the title histograms I am trying to display the results of course evaluations for several instructors using histograms. There are several questions and the responses are on a 1-5 scale from strongly disagree to strongly agree. I need a separate histogram for each question for each instructor. I used this procedure given by Gene to get the histograms: split files by instructor. frequencies Question1/histogram. split files off. I am getting the histograms but I need the x - axis to include the values 0,1,2,3,4,5, even if none of those values were chosen. I am not sure how to do this. I also tried using the graph procedure from the menu suggested by ViAnn and adjusted the Scale satatement below to include(0,1,2,3,4,5) but am not getting results. Also, the procedure below does not give the mean and standard deviation on the side which I need so I prefer using the first method if it is posisble to include 0-5 on the x -axis. split files by instructor. * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=Didthesyllabusprovideaclearsenseofthecourse COUNT()[name="COUNT"] MISSING=LISTWISE REP ORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: Didthesyllabusprovideaclearsenseofthecourse=col(source(s), name("Didthesyllabusprovideaclearsenseofthecourse"), unit.categor y()) DATA: COUNT=col(source(s), name("COUNT")) GUIDE: axis(dim(1), label("Did the syllabus provide a clear sense of the course?")) GUIDE: axis(dim(2), label("Count")) SCALE: linear(dim(2), include(0)) ELEMENT: interval(position(Didthesyllabusprovideaclearsenseofthecourse*COUNT), shape.interior(shape.square)) END GPL. Thanks for all the input, Keval ====================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 |
|
Hi Keval,
Try this trick - it adds "fake" responses with negligeable weights and the histograms have all possible values on the axes. * prepare fake data. GET FILE='C:\Program Files\SPSS14\GSS93 subset.sav' /keep id folk age /rename (folk = Question1) (age = instructor). var lab Question1 "Did the syllabus provide a clear sense of the course?" / instructor "Instructor ID". select if instructor >= 70 & instructor < 80. val lab Question1 1 "no" 5 "yes". exe. * old way - does not work: . sort cases by instructor. split file by instructor. frequencies Question1/histogram. split file off. * now the trick: add cases with very small weights for each combination instructor x Question1. compute w = 1. save outfile = 'C:/temp/auxiliary.sav' /comp. input program. - loop #i = 70 to 79. - loop #q = 1 to 5. - compute instructor = #i. - compute Question1 = #q. - compute w = 1e-250 . - end case. - end loop. - end loop. - end file. end input program. exe. save outfile = 'C:/temp/auxiliary1.sav' /comp. * merge the original file with the additional tiny-weighted fake cases and run again. get file = 'C:/temp/auxiliary.sav' . ADD FILES /FILE=* /FILE='C:\temp\auxiliary1.sav'. exe. sort cases by instructor. split file by instructor. weight by w. frequencies Question1/histogram . split file off. Hope this helps, Jan -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Keval Khichadia Sent: Tuesday, September 02, 2008 6:42 PM To: [hidden email] Subject: Editing Histograms Hi , I posted the orignal question to the list last week under the title histograms I am trying to display the results of course evaluations for several instructors using histograms. There are several questions and the responses are on a 1-5 scale from strongly disagree to strongly agree. I need a separate histogram for each question for each instructor. I used this procedure given by Gene to get the histograms: split files by instructor. frequencies Question1/histogram. split files off. I am getting the histograms but I need the x - axis to include the values 0,1,2,3,4,5, even if none of those values were chosen. I am not sure how to do this. I also tried using the graph procedure from the menu suggested by ViAnn and adjusted the Scale satatement below to include(0,1,2,3,4,5) but am not getting results. Also, the procedure below does not give the mean and standard deviation on the side which I need so I prefer using the first method if it is posisble to include 0-5 on the x -axis. split files by instructor. * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=Didthesyllabusprovideaclearsenseofthecourse COUNT()[name="COUNT"] MISSING=LISTWISE REP ORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: Didthesyllabusprovideaclearsenseofthecourse=col(source(s), name("Didthesyllabusprovideaclearsenseofthecourse"), unit.categor y()) DATA: COUNT=col(source(s), name("COUNT")) GUIDE: axis(dim(1), label("Did the syllabus provide a clear sense of the course?")) GUIDE: axis(dim(2), label("Count")) SCALE: linear(dim(2), include(0)) ELEMENT: interval(position(Didthesyllabusprovideaclearsenseofthecourse*COUNT), shape.interior(shape.square)) END GPL. Thanks for all the input, Keval ======= 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 _____________ Tato zpráva a všechny připojené soubory jsou důvěrné a určené výlučně adresátovi(-ům). Jestliže nejste oprávněným adresátem, je zakázáno jakékoliv zveřejňování, zprostředkování nebo jiné použití těchto informací. Jestliže jste tento mail dostali neoprávněně, prosím, uvědomte odesilatele a smažte zprávu i přiložené soubory. Odesilatel nezodpovídá za jakékoliv chyby nebo opomenutí způsobené tímto přenosem. Jste si jisti, že opravdu potřebujete vytisknout tuto zprávu a/nebo její přílohy? Myslete na přírodu. This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee is prohibited. If you receive this in error please contact the sender and delete the message as well as all attached documents. The sender does not accept liability for any errors or omissions as a result of the transmission. Are you sure that you really need a print version of this message and/or its attachments? Think about nature. -.- -- ===================== 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 |
| Free forum by Nabble | Edit this page |
