Date: Tue, 14 Sep 1999 11:34:56 -0300
Reply-To: hmaletta@overnet.com.ar
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Hector E. Maletta" <hmaletta@OVERNET.COM.AR>
Subject: Re: calculation with results of frequencies and crosstabs
Content-Type: text/plain; charset=us-ascii
Ruth, I think AGGREGATE is the way, though not broken by frequency.
Suppose your crosstab variables include ICD-9 plus other variables X, Y
and Z. You should then use the following form of the aggregate command:
SORT CASES BY ICD-9 X Y Z.
WEIGHT OFF.
AGGREGATE /OUTFILE=*/PRESORTED/
/BREAK ICD-9 X Y Z
/freq = nu
/mean_x= mean(x)
/meanage = mean(age)
...............
Be careful in the SORT CASES command and the BREAK subcommand with the
order of the break variables: groups will be formed depending on the
order stated (in the example, values of X will be sorted within each
value of ICD-9, then values of Y within each combination of ICD-9 and X
values, etc.). The other variables created under AGGREGATE, apart from
FREQ, are mere examples (use whatever you need for your analysis).
Next weight cases by FREQ, and proceed with your analysis.
Hector Maletta
Universidad del Salvador
Buenos Aires, Argentina
"Oberhausen, Ruth" wrote:
>
> I need some help in data management. I have some thausend records each
> of them with a variable called ICD-9 that ranges from values between 140
> to 208. Usually I assess the frequency of ICD-9 values by gender using
> crosstable commands. Now I need the cell-results for each ICD-9 variable
> value to do further calculations.
>
> Example: I want to calculate an age specific (18 age groups) incidence
> rate for each gender and each ICD-9 (140, 141, 142.....) for a specific
> population.
>
> The basic calculation is cases/population*100000 for 36 age groups.
>
> The aggregate command does not proove optimal because the output
> variable n_break (frequency) does not discriminate for the break
> variables. Does anybody have a suggestion how to proceed.
|