Date: Fri, 18 Feb 2005 15:48:20 -0500
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Art Kendall <Art@DRKENDALL.ORG>
Organization: Social Research Consultants
Subject: Re: simple spss questions
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
did you try something like this?
weight by weights.
frequencies vars=disease1 to disease3
Social Research Consultants
University Park, MD USA
Umesh Persad wrote:
> Dear List Members,
> I am having a bit of trouble figuring out how to do a simple
> calculation in SPSS.
> My data is in the form of:
> Age Sex Disease1 Disease2 Disease 3 Disease4 Weights
> 20 1 1 0 1
> 0 200
> 22 2 0 0 1 0
> The data file also contains weights for each case, so I created new
> variables by multiplying the existing varibles by the weights. All I
> want to do is
> sum the values in each variable, and to find the proportion of people
> with a disease
> by dividing by the sum of the weights variable. I also want to do this
> analysis splitting
> the data set into age bands, and finding the proportions of people with
> different diseases
> in different age groups. Finally, I want to draw a line graph showing
> this (proportions on the
> y axis, diseases on the x axis and lines for proportions in 5 age bands
> for comparison).
> I did it in excel by simply adding every weighted disease column, and
> dividing by the
> sum of the weights column to get the proportions using a formula. So I
> finally ended
> up with a table like:
> DISEASE All age groups 0-20yrs 21-40yrs ...
> Disease1 10% 23.8% 20%
> Disease2 20% ... ...
> I did this in a hurry because I could not figure out how to do it in
> SPSS at the time.
> Since I am learning SPSS, I was wondering how it would be done with
> Thank you very much,
> Umesh Persad