Creative cumulative frequency in SPSS

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

Creative cumulative frequency in SPSS

noman.siddiqui
Hi All,
 
For a statistical course I want to make cumulative frequency (not
cumulative percentage) and plot ogive in SPSS. I tried to search various
options but couldn't find any. Can SPSS create cumulative frequency or
plot polygon.
 
regards
 
 

Noman ul haq Siddiqui

Institute for educational development

' : 92-21-6347611-14 (ext 3902)

7 : 6347616

7: [hidden email]

Official: Yes
 
Reply | Threaded
Open this post in threaded view
|

Re: Creative cumulative frequency in SPSS

Marta García-Granero
Hi

If you just want the ogive plot, use this graph command:

GRAPH /LINE(SIMPLE)=CUFREQ BY "your variable" .

If you also want to have the cumulative frecuency as a new variable,
see the following example:

DATA LIST LIST/midpoint(F8.1) count(F8.0).
BEGIN DATA
0.2  2
0.6  7
1.0 10
1.4 16
1.8 23
2.2 28
2.6 19
3.0 16
3.4 11
3.8  7
4.2  1
END DATA.
WEIGHT BY count.

VALUE LABEL midpoint
0.2 '0.0-0.4' 0.6 '0.4-0.8' 1.0 '0.8-1.2' 1.4 '1.2-1.6'
1.8 '1.6-2.0' 2.2 '2.0-2.4' 2.6 '2.4-2.8' 3.0 '2.8-3.2'
3.4 '3.2-3.6' 3.8 '3.6-4.0' 4.2 '4.0-4.4'.
VARIABLE LABEL midpoint 'Lead concentration (µmol/24 h)'.

* Simple ogive plot *.
GRAPH /LINE(SIMPLE)=CUFREQ BY midpoint .

* The variable *.
NUMERIC cufreq (F8).
LEAVE cufreq.
DO IF $casenum EQ 1.
- COMPUTE cufreq=count.
ELSE.
- COMPUTE cufreq=count+LAG(cufreq).
END IF.
LIST.

* To get also a cumulative histogram *.
WEIGHT BY cufreq.
GRAPH  /HISTOGRAM=midpoint .

ns> For a statistical course I want to make cumulative frequency (not
ns> cumulative percentage) and plot ogive in SPSS. I tried to search various
ns> options but couldn't find any. Can SPSS create cumulative frequency or
ns> plot polygon.



--
Regards,
Dr. Marta García-Granero,PhD           mailto:[hidden email]
Statistician

---
"It is unwise to use a statistical procedure whose use one does
not understand. SPSS syntax guide cannot supply this knowledge, and it
is certainly no substitute for the basic understanding of statistics
and statistical thinking that is essential for the wise choice of
methods and the correct interpretation of their results".

(Adapted from WinPepi manual - I'm sure Joe Abrahmson will not mind)