CTABLES for col %

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

CTABLES for col %

John F Hall

Got it!  Well, nearly: just got to get rid of % in cells and insert additional column header row with % .

 

 

Age recoded

15-24

25-34

35-44

45-54

55-64

65 +

Total

Older peoples trust in young people

None at all

10.2%

6.4%

0.0%

3.3%

2.3%

4.0%

6.5%

2

12.9%

10.4%

0.0%

5.0%

6.8%

4.5%

9.2%

3

21.3%

18.4%

0.0%

8.3%

9.1%

14.1%

16.4%

4

24.9%

21.6%

0.0%

18.3%

12.1%

15.3%

19.8%

5

20.1%

22.4%

0.0%

21.7%

29.5%

27.7%

23.7%

6

6.0%

10.4%

0.0%

15.0%

16.7%

10.7%

10.0%

7

2.7%

4.0%

0.0%

10.0%

11.4%

6.8%

5.7%

8

1.5%

4.8%

0.0%

15.0%

6.8%

10.2%

5.7%

9

0.0%

1.6%

0.0%

1.7%

1.5%

4.0%

1.5%

A great deal

0.3%

0.0%

0.0%

1.7%

3.8%

2.8%

1.5%

n = 100%

333

125

0

60

132

177

827

 

I’ve done dozens of permutations of all the suggestions sent in and it’s DOING MY HEAD IN!  This is as far as I can get without getting error messages:

 

ctables

    /TABLE a167 [c] BY x003r [C]  [colPCT.COUNT f8.1 "%" TOTALS[COLPCT.COUNT f8.1 "%"]]

   /CATEGORIES VARIABLES= x003r TOTAL=YES POSITION=AFTER.

 

 

 

Age recoded

15-24

25-34

35-44

45-54

55-64

65 +

Total

%

%

%

%

%

%

%

Older peoples trust in young people

None at all

10.2

4.4

3.4

5.4

2.3

4.0

5.8

2

12.9

10.2

10.7

6.3

6.8

4.5

9.4

3

21.3

20.4

15.4

6.3

9.1

14.1

16.3

4

24.9

20.8

19.5

18.9

12.1

15.3

19.8

5

20.1

22.1

25.5

21.6

29.5

27.7

23.7

6

6.0

9.7

9.4

12.6

16.7

10.7

9.8

7

2.7

5.3

7.4

9.9

11.4

6.8

6.2

8

1.5

5.3

4.0

16.2

6.8

10.2

6.0

9

.0

1.8

2.7

.9

1.5

4.0

1.6

A great deal

.3

.0

2.0

1.8

3.8

2.8

1.4

 

I can copy the bottom row of base Ns for % from the first table above and add it by hand,

 

n = 100%

333

125

0

60

132

177

827

 

. . but how can I get CTABLES to create an additional row at the bottom of the table to give the valid Ns for each age group and label the row (n = 100%)? 

 

Thanks in advance, and sorry to be such a nuisance.

 

John F Hall (Mr)

[Retired academic survey researcher]

 

Email:   [hidden email] 

Website: www.surveyresearch.weebly.com

SPSS start page:  www.surveyresearch.weebly.com/1-survey-analysis-workshop

 

 

 

 

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES for col %

Art Kendall
Since this is for tutorial purposes, I would make 2 suggestions.

(1) lose the decimal points.  Good time to mention Aristotle's view of undue precision.

(2) use the word "coarsened"  instead of or together with "recoded".
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES for col %

John F Hall

Art

 

Martin Collins (SCPR) always recommended two effective figures, so perhaps yes for tutorials, but this was for Prof Dominic Abrams as part of his evidence to the Government Office for Science.  The labelling is not mine, it’s from the original 1981 European Values Survey.  I would have used “Age group of respondent (6 groups)” or similar as there is another variable x003r2 with only three groups.  I would have called them agegrp6 and agegrp3, but EVS is stuck with names as they use them in each wave.

 

ctables

    /TABLE a167 [c] BY x003r [C]  [colPCT.COUNT f8.1 "%" TOTALS[COLPCT.COUNT f8.1 "%"]]

   /CATEGORIES VARIABLES= x003r TOTAL=YES POSITION=AFTER LABEL="All"

/CATEGORIES VARIABLES= a167 TOTAL=YES POSITION=AFTER LABEL="n = 100%".

 

. . produced this, the closest I have got so far:

 

 

Age recoded

15-24

25-34

35-44

45-54

55-64

65 +

All

%

%

%

%

%

%

%

Older peoples trust in young people

None at all

10.2

4.4

3.4

5.4

2.3

4.0

5.8

2

12.9

10.2

10.7

6.3

6.8

4.5

9.4

3

21.3

20.4

15.4

6.3

9.1

14.1

16.3

4

24.9

20.8

19.5

18.9

12.1

15.3

19.8

5

20.1

22.1

25.5

21.6

29.5

27.7

23.7

6

6.0

9.7

9.4

12.6

16.7

10.7

9.8

7

2.7

5.3

7.4

9.9

11.4

6.8

6.2

8

1.5

5.3

4.0

16.2

6.8

10.2

6.0

9

.0

1.8

2.7

.9

1.5

4.0

1.6

A great deal

.3

.0

2.0

1.8

3.8

2.8

1.4

n = 100%

100.0

100.0

100.0

100.0

100.0

100.0

100.0

 

However I'm still waiting for someone to modify my CTABLES syntax to yield base Ns instead of 100.0 in the bottom row, as in the table below.  All my dozens of attempts result in error messages or a table in the wrong format.

 

 

 

 

Age recoded

 

15-24

25-34

35-44

45-54

55-64

65 +

All

 

%

%

%

%

%

%

%

 

Older peoples trust in young people

None at all

10.2

4.4

3.4

5.4

2.3

4.0

5.8

 

2

12.9

10.2

10.7

6.3

6.8

4.5

9.4

 

3

21.3

20.4

15.4

6.3

9.1

14.1

16.3

 

4

24.9

20.8

19.5

18.9

12.1

15.3

19.8

 

5

20.1

22.1

25.5

21.6

29.5

27.7

23.7

 

6

6.0

9.7

9.4

12.6

16.7

10.7

9.8

 

7

2.7

5.3

7.4

9.9

11.4

6.8

6.2

 

8

1.5

5.3

4.0

16.2

6.8

10.2

6.0

 

9

.0

1.8

2.7

.9

1.5

4.0

1.6

 

A great deal

.3

.0

2.0

1.8

3.8

2.8

1.4

n = 100%

333

125

0

60

132

177

827

 

 

John

 

John F Hall (Mr)

[Retired academic survey researcher]

 

Email:   [hidden email] 

Website: www.surveyresearch.weebly.com

SPSS start page:  www.surveyresearch.weebly.com/1-survey-analysis-workshop

 

 

 

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall
Sent: 14 November 2014 16:13
To: [hidden email]
Subject: Re: CTABLES for col %

 

Since this is for tutorial purposes, I would make 2 suggestions.

 

(1) lose the decimal points.  Good time to mention Aristotle's view of undue precision.

 

(2) use the word "coarsened"  instead of or together with "recoded".

 

 

 

-----

Art Kendall

Social Research Consultants

--

View this message in context: http://spssx-discussion.1045642.n5.nabble.com/CTABLES-for-col-tp5727938p5727939.html

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

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES for col %

Christopher Stride
John
Why would you choose to give them lower case names? That way, if you choose to display names and labels, they are harder to distinguish from the labels. Better/neater/easier for someone viewing your output - to use uppercase names IMO e.g. AGEGRP6 and AGEGRP3.
cheers
Chris


On 14/11/2014 15:56, John F Hall wrote:

Art

 

Martin Collins (SCPR) always recommended two effective figures, so perhaps yes for tutorials, but this was for Prof Dominic Abrams as part of his evidence to the Government Office for Science.  The labelling is not mine, it’s from the original 1981 European Values Survey.  I would have used “Age group of respondent (6 groups)” or similar as there is another variable x003r2 with only three groups.  I would have called them agegrp6 and agegrp3, but EVS is stuck with names as they use them in each wave.

 

ctables

    /TABLE a167 [c] BY x003r [C]  [colPCT.COUNT f8.1 "%" TOTALS[COLPCT.COUNT f8.1 "%"]]

   /CATEGORIES VARIABLES= x003r TOTAL=YES POSITION=AFTER LABEL="All"

/CATEGORIES VARIABLES= a167 TOTAL=YES POSITION=AFTER LABEL="n = 100%".

 

. . produced this, the closest I have got so far:

 

 

Age recoded

15-24

25-34

35-44

45-54

55-64

65 +

All

%

%

%

%

%

%

%

Older peoples trust in young people

None at all

10.2

4.4

3.4

5.4

2.3

4.0

5.8

2

12.9

10.2

10.7

6.3

6.8

4.5

9.4

3

21.3

20.4

15.4

6.3

9.1

14.1

16.3

4

24.9

20.8

19.5

18.9

12.1

15.3

19.8

5

20.1

22.1

25.5

21.6

29.5

27.7

23.7

6

6.0

9.7

9.4

12.6

16.7

10.7

9.8

7

2.7

5.3

7.4

9.9

11.4

6.8

6.2

8

1.5

5.3

4.0

16.2

6.8

10.2

6.0

9

.0

1.8

2.7

.9

1.5

4.0

1.6

A great deal

.3

.0

2.0

1.8

3.8

2.8

1.4

n = 100%

100.0

100.0

100.0

100.0

100.0

100.0

100.0

 

However I'm still waiting for someone to modify my CTABLES syntax to yield base Ns instead of 100.0 in the bottom row, as in the table below.  All my dozens of attempts result in error messages or a table in the wrong format.

 

 

 

 

Age recoded

 

15-24

25-34

35-44

45-54

55-64

65 +

All

 

%

%

%

%

%

%

%

 

Older peoples trust in young people

None at all

10.2

4.4

3.4

5.4

2.3

4.0

5.8

 

2

12.9

10.2

10.7

6.3

6.8

4.5

9.4

 

3

21.3

20.4

15.4

6.3

9.1

14.1

16.3

 

4

24.9

20.8

19.5

18.9

12.1

15.3

19.8

 

5

20.1

22.1

25.5

21.6

29.5

27.7

23.7

 

6

6.0

9.7

9.4

12.6

16.7

10.7

9.8

 

7

2.7

5.3

7.4

9.9

11.4

6.8

6.2

 

8

1.5

5.3

4.0

16.2

6.8

10.2

6.0

 

9

.0

1.8

2.7

.9

1.5

4.0

1.6

 

A great deal

.3

.0

2.0

1.8

3.8

2.8

1.4

n = 100%

333

125

0

60

132

177

827

 












 

John

 

John F Hall (Mr)

[Retired academic survey researcher]

 

Email:   [hidden email] 

Website: www.surveyresearch.weebly.com

SPSS start page:  www.surveyresearch.weebly.com/1-survey-analysis-workshop

 

 

 

-----Original Message-----
From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Art Kendall
Sent: 14 November 2014 16:13
To: [hidden email]
Subject: Re: CTABLES for col %

 

Since this is for tutorial purposes, I would make 2 suggestions.

 

(1) lose the decimal points.  Good time to mention Aristotle's view of undue precision.

 

(2) use the word "coarsened"  instead of or together with "recoded".

 

 

 

-----

Art Kendall

Social Research Consultants

--

View this message in context: http://spssx-discussion.1045642.n5.nabble.com/CTABLES-for-col-tp5727938p5727939.html

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

===================== 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

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES for col %

Art Kendall
In reply to this post by John F Hall
<begin soapbox>

In reports to the US Congress I especially tried to avoid superfluous decimal points.
(1) it is cognitively easier to compare/contrast less complex stimuli. Mental processing of 2 digits (F2) is easier than 3 (F3.1).
(2) with sampling error decimal places are rarely meaningful, i.e., .1 percentage point does not mean anything when the margin of error (one sided distance from mean @ .95) is 3 percentage points.
(3) historically with manually produced tables it was conventional to make %s to sum to 100% but IMHO that summing is a quality assurance test done while "referencing" the work, not for a reader.
(4) the exception would be when tenths of a  percentage point made a substantive (interpretive) difference, e.g., all percentages were single digits of were less that 1%.

Depending on the discipline, excess apparent precision is known as the fallacy of precision.

Some use the terminology "sig figs".

Of course, I am discussing presentation precision and not computational precision.
<end soapbox>
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES for col %

Art Kendall
In reply to this post by John F Hall
2 meaningful digits sounds good to me.

wrt agegrp3 and agegrp6  I would tend to use camel coding, i.e., AgeGrp3 and AgeGrp6.
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: CTABLES for col %

John F Hall
Art

I used to do this in teaching by asking students, "What is 0.1% of 200 cases
anyway?"  In the context of the importance of sample size, when explaining
the need to keep cell sizes to 40 or more, another useful pearl of wisdom
was to ask them "What happens when you move a single case to another cell?"
It usually dawned on them that even with 40 cases in a cell, moving one of
them makes a net difference of 5 percentage points.

"Camel coding"?  Never heard of that before, but apposite for your Mixed
Case varnames.  That just makes for using the Shift key as well as typing
letters.  UPPER CASE text in names and labels is ugly.  I always use lower
case myself and all the varnames in EVS files are lower case anyway.  I try
to avoid using names and labels in output as it just makes for clutter: the
only time I use both is when exploring a file for the first time or to
demonstrate them in tutorials.  

If question numbers are included at the beginning of varlabels, it's better
to set the dialog boxes to labels only to make it easier to find them.  With
mnemonic names it's maddening having to scroll up and down looking for them:
another reason for using syntax wherever possible (working from the *.sav
file in var view).  The problem with EVS 1981 is there are no question
numbers in the varlabs and the variables are in alphabetical order even when
you ask for displays to be in questionnaire order. Another problem is that
there is more than one version of the 1981 file and each has different
variable names!

This is because I worked on creating SPSS files from the original (EBCDIC)
card-image magnetic tape from Gallup (I still have it in the attic!).  The
questionnaire was marked up for data prep with card and column indicated for
each question.  The published questionnaire looks like this:

V111 Question 111
Thinking of the way you spend your leisure time, what is more important to
you - relaxing as much as possible or doing things, being active?
        1 Sitting and relaxing as much as possible
        2 Doing things, being active
        3 Both equally
        V Don't know

Question 112
And during your leisure time do you preper [sic] to be alone, to be with
your family, to be with friends or to be in al lively place with many
people?
        V112 1 Alone
        V113 2 With family
        V114 3 With friends
        V115 4 In a lively place
        V116 5 All equally
        V117 V Don't know

It was therefore a simple job to create SPSS files using the positional
convention for varnames in which the varname reflects the position on the
raw data.  V11 is not the 111th variable in the file, it's the variable for
which data are located on record 1 column 11.  This makes it much easier to
navigate both data and questionnaire.

The one actually used in the field was very different.  The first question
asked about the relevance of the "Ten Commandments today" and one of the
first analyses requested was a Factor Analysis of the replies!  One of my
researchers was later seconded to the European Value Systems Study Group
(EVSSG) for a couple of years to work to the panel on that and later waves:
another was funded by them in-house.

EVSSG was strongly Roman Catholic in flavour, but I managed to get Mark
Abrams a seat on their planning group chaired by Jan Kerkhofs (Catholic
University of Louvain) alongside George Gallup himself, Hélène Riffault
(IFOP) Elizabeth Noelle-Neumann (Allensbach) Gordon Heald (Gallup UK) and
others.  Two books came from this group:

Mark Abrams, David Gerard and Noël Timms (Eds)
Values and Social Change in Britain. (Macmillan 1985)

Stephen Harding and David Phillips
Contrasting Values in Western Europe: Unity, Diversity and Change.
(Macmillan, 1986)  

The survey later transmogrified into the World Quality of Life Survey
[sic!!] and then back to the current surveys, European Values Survey and
World Values Survey.  Gordon Heald (CEO of Gallup UK) lifted questions
wholesale from the work I did in the early 1970s with Mark Abrams on
measuring Quality of Life in Britain (in collaboration with Angus Campbell
et al at ISR Ann Arbor on QoL in America, and Norman Bradburn at NORC) but
in my experience that was typical.

It's now back as the  Gallup World Quality of Life Survey. (See:
https://www.google.fr/search?q=Gallup+World+Quality+of+Life+Survey&oq=Gallup
+World+Quality+of+Life+Survey&aqs=chrome..69i57.6498j0j4&sourceid=chrome&esp
v=210&es_sm=93&ie=UTF-8 but I'm not sure how involved they are in the
European Quality of Life Survey.
(http://eurofound.europa.eu/surveys/eqls/index )  With an overall response
rate of 58% (and only 33.5% for the UK) is it worth the paper it’s written
on?  (See my slide-show on:
https://www.academia.edu/9157550/Close_Encounters_slide-show_2_European_Qual
ity_of_Life_Survey: see also the other Close Encounters items on
https://xiaoyao.academia.edu/JohnFHall/Talks 

Have a great weekend.

John

John F Hall (Mr)
[Retired academic survey researcher]

Email:   [hidden email]  
Website: www.surveyresearch.weebly.com  
SPSS start page:  www.surveyresearch.weebly.com/1-survey-analysis-workshop





-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art
Kendall
Sent: 14 November 2014 20:16
To: [hidden email]
Subject: Re: CTABLES for col %

2 meaningful digits sounds good to me.

wrt agegrp3 and agegrp6  I would tend to use camel coding, i.e., AgeGrp3 and
AgeGrp6.



-----
Art Kendall
Social Research Consultants
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/CTABLES-for-col-tp5727938p5727
944.html
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

=====================
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