getting frequency by first event

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

ludhianvi
Posts: 6
Joined: Wed Jul 02, 2008 1:45 pm

getting frequency by first event

Postby ludhianvi » Thu Jul 24, 2008 12:09 pm

Hi everybody,

I have a data like following:

id follow_up birth
a 1 1
a 2 0
a 3 1
b 2 1
b 1 .
b 3 0
c 1 .
c 2 1
c 3 0

Now I am interested in frequency of birth but only first event counted.
So according to first event counted , the frequency of birth is 3.

How can I do that in SPSS?

Thanks,
Ludhianvi.
Fierce
Moderator
Posts: 391
Joined: Sun Dec 28, 2008 5:55 pm
Location: Belo Horizonte, Brasil

Postby Fierce » Thu Jan 01, 2009 4:34 pm

Use select cases.
DATA>SELECT CASES. Choose "IF CONDITION IS SATISFIED" and define your condition (like "follow_up = 1"). Or just use the syntax:

Code: Select all

USE ALL.
COMPUTE filter_$=(<VARIABLE TO USE AS FILTER> = <SELECTED VALUE>).
VARIABLE LABEL filter_$ '<VARIABLE TO USE AS FILTER> = <SELECTED VALUE> (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMAT filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.
To select all cases again, choose "ALL CASES" in the select cases dialog or the syntax:

Code: Select all

FILTER OFF.
USE ALL.
EXECUTE.

Who is online

Users browsing this forum: No registered users and 1 guest

cron