help with custom Tables

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

help with custom Tables

Cleland, Patricia (EDU)

I’m trying to re-create the output from the old, and now longer available, Table of Frequencies command. I assume that I need to use Custom Tables, but I can’t get it to give me what I want.

 

Here’s the syntax that I’m using:

 

CTABLES

  /VLABELS VARIABLES=r_q4_5a r_q4_5b r_q4_5c r_q4_5d r_q4_5e DISPLAY=DEFAULT

  /TABLE r_q4_5a [COUNT F40.0, COLPCT.COUNT PCT40.1] + r_q4_5b [COUNT F40.0, COLPCT.COUNT PCT40.1]

    + r_q4_5c [COUNT F40.0, COLPCT.COUNT PCT40.1] + r_q4_5d [COUNT F40.0, COLPCT.COUNT PCT40.1] +

    r_q4_5e [COUNT F40.0, COLPCT.COUNT PCT40.1]

  /CATEGORIES VARIABLES=r_q4_5a r_q4_5b r_q4_5c r_q4_5d r_q4_5e [1] EMPTY=INCLUDE.

 

Here’s the output that I get:

 

 

Count

Column N %

r_q4_5a

1 Yes

23

100%

r_q4_5b

1 Yes

5

100%

r_q4_5c

1 Yes

16

100%

r_q4_5d

1 Yes

8

100%

r_q4_5e

1 Yes

11

100%

 

 

Here’s the output that I want. Note that there are a total of 44 cases in the data set and the questions are independent. Thus the total number of items endorsed may be more than the total number of cases.

 

 

Count

Column N %

r_q4_5a

1 Yes

23

52.3%

r_q4_5b

1 Yes

5

11.4%

r_q4_5c

1 Yes

16

36.4%

r_q4_5d

1 Yes

8

18.2%

r_q4_5e

1 Yes

11

25.0%

Total

 

44

100.0%

 

The closest that I’ve been able to come is using the Multiple Response command:

 

 

Responses

Percent of Cases

N

Percent

$MultReponseCategory

r_q4_5a

23

36.5%

52.3%

r_q4_5b

5

7.9%

11.4%

r_q4_5c

16

25.4%

36.4%

r_q4_5d

8

12.7%

18.2%

r_q4_5e

11

17.5%

25.0%

Total

63

100.0%

143.2%

 

 

Any help would be appreciated.

Pat

 

Reply | Threaded
Open this post in threaded view
|

Re: help with custom Tables

John F Hall
Pat,
 
Looks like your syntax was generated from the GUI (Yuk!!).  If I understand what you want, you need mult response in dichotomous mode.  This should produce the second example of your tables.  I'm an unrepentant syntax user and only use GUI when it's several keystrokes (and many lines) quicker.  Try something like:
 
mult resp groups <groupname> ' <label> '
    ( <varlist> (1) )
    /freq <groupname> .
 
You can use <groupname> in tables, but you have to have a / var <varlist> subcommand and use / tab for the tables.
 
 
 
 
----- Original Message -----
Sent: Monday, November 22, 2010 7:59 PM
Subject: help with custom Tables

I’m trying to re-create the output from the old, and now longer available, Table of Frequencies command. I assume that I need to use Custom Tables, but I can’t get it to give me what I want.

 

Here’s the syntax that I’m using:

 

CTABLES

  /VLABELS VARIABLES=r_q4_5a r_q4_5b r_q4_5c r_q4_5d r_q4_5e DISPLAY=DEFAULT

  /TABLE r_q4_5a [COUNT F40.0, COLPCT.COUNT PCT40.1] + r_q4_5b [COUNT F40.0, COLPCT.COUNT PCT40.1]

    + r_q4_5c [COUNT F40.0, COLPCT.COUNT PCT40.1] + r_q4_5d [COUNT F40.0, COLPCT.COUNT PCT40.1] +

    r_q4_5e [COUNT F40.0, COLPCT.COUNT PCT40.1]

  /CATEGORIES VARIABLES=r_q4_5a r_q4_5b r_q4_5c r_q4_5d r_q4_5e [1] EMPTY=INCLUDE.

 

Here’s the output that I get:

 

 

Count

Column N %

r_q4_5a

1 Yes

23

100%

r_q4_5b

1 Yes

5

100%

r_q4_5c

1 Yes

16

100%

r_q4_5d

1 Yes

8

100%

r_q4_5e

1 Yes

11

100%

 

 

Here’s the output that I want. Note that there are a total of 44 cases in the data set and the questions are independent. Thus the total number of items endorsed may be more than the total number of cases.

 

 

Count

Column N %

r_q4_5a

1 Yes

23

52.3%

r_q4_5b

1 Yes

5

11.4%

r_q4_5c

1 Yes

16

36.4%

r_q4_5d

1 Yes

8

18.2%

r_q4_5e

1 Yes

11

25.0%

Total

 

44

100.0%

 

The closest that I’ve been able to come is using the Multiple Response command:

 

 

Responses

Percent of Cases

N

Percent

$MultReponseCategory

r_q4_5a

23

36.5%

52.3%

r_q4_5b

5

7.9%

11.4%

r_q4_5c

16

25.4%

36.4%

r_q4_5d

8

12.7%

18.2%

r_q4_5e

11

17.5%

25.0%

Total

63

100.0%

143.2%

 

 

Any help would be appreciated.

Pat

 

Reply | Threaded
Open this post in threaded view
|

Re: help with custom Tables

ViAnn Beadle
In reply to this post by Cleland, Patricia (EDU)

Since you’re totaling across variables, perhaps converting the 5 vars into a multiple dichotomy set would be easier.

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Cleland, Patricia (EDU)
Sent: Monday, November 22, 2010 11:59 AM
To: [hidden email]
Subject: help with custom Tables

 

I’m trying to re-create the output from the old, and now longer available, Table of Frequencies command. I assume that I need to use Custom Tables, but I can’t get it to give me what I want.

 

Here’s the syntax that I’m using:

 

CTABLES

  /VLABELS VARIABLES=r_q4_5a r_q4_5b r_q4_5c r_q4_5d r_q4_5e DISPLAY=DEFAULT

  /TABLE r_q4_5a [COUNT F40.0, COLPCT.COUNT PCT40.1] + r_q4_5b [COUNT F40.0, COLPCT.COUNT PCT40.1]

    + r_q4_5c [COUNT F40.0, COLPCT.COUNT PCT40.1] + r_q4_5d [COUNT F40.0, COLPCT.COUNT PCT40.1] +

    r_q4_5e [COUNT F40.0, COLPCT.COUNT PCT40.1]

  /CATEGORIES VARIABLES=r_q4_5a r_q4_5b r_q4_5c r_q4_5d r_q4_5e [1] EMPTY=INCLUDE.

 

Here’s the output that I get:

 

 

Count

Column N %

r_q4_5a

1 Yes

23

100%

r_q4_5b

1 Yes

5

100%

r_q4_5c

1 Yes

16

100%

r_q4_5d

1 Yes

8

100%

r_q4_5e

1 Yes

11

100%

 

 

Here’s the output that I want. Note that there are a total of 44 cases in the data set and the questions are independent. Thus the total number of items endorsed may be more than the total number of cases.

 

 

Count

Column N %

r_q4_5a

1 Yes

23

52.3%

r_q4_5b

1 Yes

5

11.4%

r_q4_5c

1 Yes

16

36.4%

r_q4_5d

1 Yes

8

18.2%

r_q4_5e

1 Yes

11

25.0%

Total

 

44

100.0%

 

The closest that I’ve been able to come is using the Multiple Response command:

 

 

Responses

Percent of Cases

N

Percent

$MultReponseCategory

r_q4_5a

23

36.5%

52.3%

r_q4_5b

5

7.9%

11.4%

r_q4_5c

16

25.4%

36.4%

r_q4_5d

8

12.7%

18.2%

r_q4_5e

11

17.5%

25.0%

Total

63

100.0%

143.2%

 

 

Any help would be appreciated.

Pat