LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2005)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 2 Nov 2005 20:28:04 -0500
Reply-To:     Richard Ristow <wrristow@mindspring.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Richard Ristow <wrristow@mindspring.com>
Subject:      Re: brain teaser
Comments: To: Jean Campbell <campbel@u.arizona.edu>
In-Reply-To:  <20051102173356.19096BA86E3@smtpgate.email.arizona.edu>
Content-Type: text/plain; charset="us-ascii"; format=flowed

At 12:33 PM 11/2/2005, Jean Campbell wrote:

>I am trying to determine the % of subjects who experience an adverse >event (symptom) by their treatment group (1,2, or 3).

And at 03:35 PM 11/2/2005, off-list:

>Each subject listed has reported either one, multiple or no adverse >events (in AE column, "99").

Try this. Tested; SPSS draft output. I've added some subjects with no adverse events to your test data.

* ........................... . . /**/ LIST. |---------------------------|-----------------------| |Output Created |02 Nov 05 20:20:17 | |---------------------------|-----------------------| SUBJ_ID AE TXT_GRP

1 2 1 1 2 1 1 3 1 1 4 1 2 2 2 2 3 2 2 3 2 2 4 1 10 99 1 11 99 1 12 99 2 12 99 2 12 99 2 21 1 3 22 2 3 23 3 3 24 99 3

Number of cases read: 17 Number of cases listed: 17

* Count AEs by subject; . * preserve group number . TEMPORARY. RECODE AE (99 = 0) (1 THRU HI = 1). AGGREGATE OUTFILE=* /BREAK = SUBJ_ID /NMBR_AE 'Number of adverse events' = SUM(AE) /TXT_GRP = FIRST(TXT_GRP).

FORMATS NMBR_AE(F3). LIST. |---------------------------|-----------------------| |Output Created |02 Nov 05 20:20:18 | |---------------------------|-----------------------| SUBJ_ID NMBR_AE TXT_GRP

1 4 1 2 4 2 10 0 1 11 0 1 12 0 2 21 1 3 22 1 3 23 1 3 24 0 3

Number of cases read: 9 Number of cases listed: 9

* Count subjects with AEs, by group . RECODE NMBR_AE (0 = 0)(1 THRU HI = 1) INTO ANY_AE. FORMATS ANY_AE (F2). VAR LABELS ANY_AE 'Has subject any adverse events?'.

CROSSTABS /TABLES=any_ae nmbr_ae BY txt_grp /FORMAT= AVALUE TABLES /CELLS= COUNT COLUMN .

Crosstabs Notes |---------------------------|-----------------------| |Output Created |02 Nov 05 20:20:18 | |---------------------------|-----------------------| Case Processing Summary [suppressed - no missing data]

ANY_AE Has subject any adverse events? * TXT_GRP Crosstabulation |---------------------------|--------------------|------| | |TXT_GRP |Total | | |------|------|------| | | |1 |2 |3 | | |-----------|-|-------------|------|------|------|------| |ANY_AE Has|0|Count |2 |1 |1 |4 | |subject any| |-------------|------|------|------|------| |adverse | |% within |66.7% |50.0% |25.0% |44.4% | |events? | |TXT_GRP | | | | | | |-|-------------|------|------|------|------| | |1|Count |1 |1 |3 |5 | | | |-------------|------|------|------|------| | | |% within |33.3% |50.0% |75.0% |55.6% | | | |TXT_GRP | | | | | |-----------|-|-------------|------|------|------|------| |Total |Count |3 |2 |4 |9 | | |-------------|------|------|------|------| | |% within |100.0%|100.0%|100.0%|100.0%| | |TXT_GRP | | | | | |-------------|-------------|------|------|------|------|

NMBR_AE Number of adverse events * TXT_GRP Crosstabulation |-----------------------|--------------------|------| | |TXT_GRP |Total | | |------|------|------| | | |1 |2 |3 | | |-------|-|-------------|------|------|------|------| |NMBR_AE|0|Count |2 |1 |1 |4 | |Number | |-------------|------|------|------|------| |of | |% within |66.7% |50.0% |25.0% |44.4% | |adverse| |TXT_GRP | | | | | |events |-|-------------|------|------|------|------| | |1|Count | | |3 |3 | | | |-------------|------|------|------|------| | | |% within | | |75.0% |33.3% | | | |TXT_GRP | | | | | | |-|-------------|------|------|------|------| | |4|Count |1 |1 | |2 | | | |-------------|------|------|------|------| | | |% within |33.3% |50.0% | |22.2% | | | |TXT_GRP | | | | | |-------|-|-------------|------|------|------|------| |Total |Count |3 |2 |4 |9 | | |-------------|------|------|------|------| | |% within |100.0%|100.0%|100.0%|100.0%| | |TXT_GRP | | | | | |---------|-------------|------|------|------|------|


Back to: Top of message | Previous page | Main SPSSX-L page