Syntax for keeping or dropping records

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

Syntax for keeping or dropping records

Suh-Ing Amy Hsieh
Hi listers:
I have selected patients with hematological malignancies
undergoing bone marrow transplant (BMT) from originally big
hospitalization data sets as the index BMT (around 700 more cases and one
line per case).  Also, I used
patients’ ID (32 length) to select pre-BMT and post-BMT records from
originally big hospitalization data sets again for 2 outcomes (overall
survival and 30 day readmission of BMT discharge).  Yet, the later data set also
includes records of BMT and has one line or multiple lines per case.  Both data sets have the same
variables.  I am thinking how
to use lag function to keep only pre-BMT/post-BMT records and drop BMT
records by id (string), admission date (string, e.g, 20010102), and
discharge date (string, 20010201).
Could someone show me how to create syntax for keeping pre- or
post-BMT records or dropping BMT records?  Thanks and happy holidays.




Variables in the DATA 1:
id id_sex birthday hosp_id prsn_id in_date out_date
e_bedd tran_cd icd9cd icd9cd1 icdopcd icdopcd1 dx_am med_am…









Variables in the DATA 2:
id id_sex birthday hosp_id prsn_id in_date out_date
e_bedd tran_cd icd9cd icd9cd1 icdopcd icdopcd1 dx_am med_am…





Amy Hsieh

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Syntax for keeping or dropping records

Clive Downs
Amy,

Could you post a small sample data set to show what the problem is please?

Thanks,

Clive.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD