[NB] For some unknown reason, orange.fr has disabled my @wanadoo.fr and @orange.fr links to their server and changed my username. Until I can reset the password (which will arrive by snail-mail letter "within 10 days"!) I have no email facility.
I'm doing some analysis on UK voting in the 2016 EU referendum and wanted some charts.
1: Educational level and EU vote
* Encoding: UTF-8.
graph /BAR (grouped) = hedqual4 by euvot2.
produces this chart:
graph /BAR (grouped) Country by euvot2.
produces this chart:
I solved it with:
temp.
compute xxx=country.
graph /BAR (grouped) xxx by euvot2.
to get:
Looks like SPSS confused the variable name "country" with a COUNT sub-command, but how would I specify the first chart to display % rather than n voting leave or remain? No examples in the FM. Tried dozens of variations without success.
2: UK region by EU vote
I used
ctables
/TABLE GOR_ID BY euvot2
[ROWPCT.COUNT f5.1 "%" totals [count "n= 100%"]]
/CATEGORIES VARIABLES= euvot2 TOTAL=YES .
to get the following table:
I copied the table to Excel and re-ordered the rows by Yes vote:
Is there way to get CTABLES to re-order the rows?
Desperately waiting for restoration of orange.fr, but will check Nabble for replies.
John F Hall (SPSS24, Win 7 Pro)
Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== 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 |
Looks like I can use a gmail account instead of orange.fr. To confirm, can someone please send a test reply? Thanks in advance John F Hall MA (Cantab) Dip Ed (Dunelm) [retired academic survey researcher] email: [hidden email] Website: Journeys in Survey Research Course: Survey Analysis Workshop (SPSS) |
In reply to this post by John F Hall
On the first question, the syntax is incorrect for the GRAPH command. It should be something like GRAPH /BAR(GROUPED)=COUNT BY country BY gender. not GRAPH /BAR(GROUPED)= country BY gender. and that tells you that this will give you the percentages. GRAPH /BAR(GROUPED)=PCT BY country BY gender. Of course, GGRAPH provides a lot more flexibility. On the CTABLES question, CTABLES sorts by the total. However, you can resort by any specific column using SPSSINC MODIFY TABLES. For example, SPSSINC MODIFY TABLES subtype="customtable" SELECT=0 /STYLES CUSTOMFUNCTION="customstylefunctions.sortTable". would sort by the first column. You can now also do the sort using OUTPUT MODIFY. Right click on the table and choose Style Output to generate the syntax for that. On Fri, Oct 11, 2019 at 1:59 AM John F Hall <[hidden email]> wrote: [NB] For some unknown reason, orange.fr has disabled my @wanadoo.fr and @orange.fr links to their server and changed my username. Until I can reset the password (which will arrive by snail-mail letter "within 10 days"!) I have no email facility. I'm doing some analysis on UK voting in the 2016 EU referendum and wanted some charts. 1: Educational level and EU vote * Encoding: UTF-8. graph /BAR (grouped) = hedqual4 by euvot2. produces this chart: graph /BAR (grouped) Country by euvot2. produces this chart: I solved it with: temp. compute xxx=country. graph /BAR (grouped) xxx by euvot2. to get: Looks like SPSS confused the variable name "country" with a COUNT sub-command, but how would I specify the first chart to display % rather than n voting leave or remain? No examples in the FM. Tried dozens of variations without success. 2: UK region by EU vote I used ctables /TABLE GOR_ID BY euvot2 [ROWPCT.COUNT f5.1 "%" totals [count "n= 100%"]] /CATEGORIES VARIABLES= euvot2 TOTAL=YES . to get the following table: I copied the table to Excel and re-ordered the rows by Yes vote: Is there way to get CTABLES to re-order the rows? Desperately waiting for restoration of orange.fr, but will check Nabble for replies. John F Hall (SPSS24, Win 7 Pro) |
In reply to this post by John F Hall-2
received this post.
Art Kendall ----- Art Kendall Social Research Consultants -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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 |
In reply to this post by John F Hall
Jon Thanks for the correction. Works a treat. Very steep slopes for level of education and age group. Must find a way to chart all three variables together. -- John F Hall MA (Cantab) Dip Ed (Dunelm) [retired academic survey researcher] email: [hidden email] Website: Journeys in Survey Research Course: Survey Analysis Workshop (SPSS) |
GGRAPH offers the option of a dual axis chart, so you can have different scales in the same chart. On Sat, Oct 12, 2019 at 11:15 AM John F Hall <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |