missing values in ctables

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

missing values in ctables

John F Hall

 

ctables

  /VLABELS VARIABLES=rsex earngrp hedqual3  DISPLAY=NONE

             /TABLE hedqual3  > rsex by  earngrp

    [ROWPCT.COUNT f5.1 "%"  TOTALS [COUNT "n= 100%"]]

           /CATEGORIES VARIABLES=  earngrp  TOTAL=YES POSITION=after.

 

For highest educational qualification “DK/Refusal/NA” is coded as -8:  missing values are declared as (lo thru -1) but I get this:

 

 

Q1

Q2

Q3

Q4

Total

%

%

%

%

n= 100%

Degree

Male

1.9

9.6

30.2

58.3

417

Female

6.4

18.9

34.6

40.2

376

Higher educ below degree/A level

Male

4.6

27.3

33.4

34.7

455

Female

17.5

38.2

28.0

16.2

382

O level or equiv/CSE

Male

10.5

35.6

33.3

20.6

354

Female

24.9

46.7

19.2

9.2

261

No qualification

Male

20.0

52.7

18.2

9.1

110

Female

44.4

40.0

8.9

6.7

45

DK/Refusal/NA

Male

0.0

0.0

0.0

0.0

0

Female

0.0

0.0

0.0

0.0

0

 

Why?

 

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: missing values in ctables

John F Hall

Tim

 

You were right.  There’s a “ghost” label 8 which was recoded to -8.  I removed it via the Data Editor Labels dialog box and hey presto!

 

ctables /table by hedqual3.

 

Highest educational qual obtained - dv

Degree

Higher educ below degree/A level

O level or equiv/CSE

No qualification

DK/Refusal/NA

Count

Count

Count

Count

Count

863

909

672

188

0

. . changes to:

 

Highest educational qual obtained - dv

Degree

Higher educ below degree/A level

O level or equiv/CSE

No qualification

Count

Count

Count

Count

863

909

672

188

. . and the table to:

 

 

Q1

Q2

Q3

Q4

Total

%

%

%

%

n= 100%

Degree

Male

1.9

9.6

30.2

58.3

417

Female

6.4

18.9

34.6

40.2

376

Higher educ below degree/A level

Male

4.6

27.3

33.4

34.7

455

Female

17.5

38.2

28.0

16.2

382

O level or equiv/CSE

Male

10.5

35.6

33.3

20.6

354

Female

24.9

46.7

19.2

9.2

261

No qualification

Male

20.0

52.7

18.2

9.1

110

Female

44.4

40.0

8.9

6.7

45

 

Not so much a bug, but nevertheless unexpected.

 

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

 

 

 

 

From: Timothy Hennigar [mailto:[hidden email]]
Sent: 22 August 2016 13:57
To: 'John F Hall' <[hidden email]>
Subject: RE: missing values in ctables

 

I never do tables like this : but if what you want is to remove the ‘DK..’ with the 0 entries in the table .. try removing the

‘Dk..’ from the value labels of the variable .. see what you get .. (not tried .. but solves an occasional issue I do get).

 

 

 

 

 

 

 

Thanks!

 

*********************************

Notice: This e-mail and any attachments may contain confidential and privileged information.  If you are not the intended recipient, please notify the sender immediately by return e-mail, do not use the information, delete this e-mail and destroy any copies.  Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal.  Email transmissions cannot be guaranteed to be secure or error free. The sender therefore does not accept any liability for errors or omissions in the contents of this message that arise as a result of email transmissions.

 

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of John F Hall
Sent: Monday, August 22, 2016 07:46 AM
To: [hidden email]
Subject: missing values in ctables

 

 

ctables

  /VLABELS VARIABLES=rsex earngrp hedqual3  DISPLAY=NONE

             /TABLE hedqual3  > rsex by  earngrp

    [ROWPCT.COUNT f5.1 "%"  TOTALS [COUNT "n= 100%"]]

           /CATEGORIES VARIABLES=  earngrp  TOTAL=YES POSITION=after.

 

For highest educational qualification “DK/Refusal/NA” is coded as -8:  missing values are declared as (lo thru -1) but I get this:

 

 

Q1

Q2

Q3

Q4

Total

%

%

%

%

n= 100%

Degree

Male

1.9

9.6

30.2

58.3

417

Female

6.4

18.9

34.6

40.2

376

Higher educ below degree/A level

Male

4.6

27.3

33.4

34.7

455

Female

17.5

38.2

28.0

16.2

382

O level or equiv/CSE

Male

10.5

35.6

33.3

20.6

354

Female

24.9

46.7

19.2

9.2

261

No qualification

Male

20.0

52.7

18.2

9.1

110

Female

44.4

40.0

8.9

6.7

45

DK/Refusal/NA

Male

0.0

0.0

0.0

0.0

0

Female

0.0

0.0

0.0

0.0

0

 

Why?

 

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

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