From | "Christopher Olola" <[email protected]> |
To | <[email protected]> |
Subject | st: Selecting specific observations and replacing values of theirvariables |
Date | Fri, 01 Nov 2002 16:17:46 +0300 |
Dear Statalsist members, I seek your help ....I have data being entered by two different clerks (resulting in two datasets - pig1 and pig2). Verification of the 2 files (program used), results in a text file being generated with discrepancy errors. Using stata (infile), after formatting the ASCII file, I get a *.dta with contents snippet as.... date paxno entry var val 1. 00/07/02 02054 pig1: PCO2 01.6 2. 00/07/02 XXXXX pig2: PCO2 01.3 3. 00/07/02 02059 pig1: TRANSFUSED 2 4. 00/07/02 XXXXX pig2: TRANSFUSED 1 5. 00/07/02 02067 pig1: DTIME 1930 6. 00/07/02 XXXXX pig2: DTIME 1920 7. 00/07/02 02067 pig1: HCTSOURCE 3 8. 00/07/02 XXXXX pig2: HCTSOURCE 1 9. 00/07/02 02068 pig1: TEMP 37.5 10. 00/07/02 XXXXX pig2: TEMP 37.8 11. 00/07/02 02069 pig1: WEIGHT 06.5 12. 00/07/02 XXXXX pig2: WEIGHT 06.8 problem: 1. I wish to replace XXXXX in variable "paxno" with the preceding paxno's value (valid value). 2. Each two consecutive records belong tdiscrepancy patient and varibale "val" indicates the discrepacy between the two entries made by two clerks. Any help? thanks. Chris.
Dear Statalsist members,
I seek your help ....I have data being entered by two
different clerks (resulting in two datasets - pig1 and pig2). Verification
of the 2 files (program used), results in a text file being generated
with discrepancy errors. Using stata (infile), after formatting the ASCII
file, I get a *.dta with contents snippet as....
date
paxno
entry
var
val
1. 00/07/02 02054 pig1: PCO2 01.6 2. 00/07/02 XXXXX pig2: PCO2 01.3 3. 00/07/02 02059 pig1: TRANSFUSED 2 4. 00/07/02 XXXXX pig2: TRANSFUSED 1 5. 00/07/02 02067 pig1: DTIME 1930 6. 00/07/02 XXXXX pig2: DTIME 1920 7. 00/07/02 02067 pig1: HCTSOURCE 3 8. 00/07/02 XXXXX pig2: HCTSOURCE 1 9. 00/07/02 02068 pig1: TEMP 37.5 10. 00/07/02 XXXXX pig2: TEMP 37.8 11. 00/07/02 02069 pig1: WEIGHT 06.5 12. 00/07/02 XXXXX pig2: WEIGHT 06.8 problem:
1. I wish to replace XXXXX in variable "paxno" with the preceding paxno's value (valid
value).
2. Each two consecutive records belong tdiscrepancy
patient and varibale "val" indicates the discrepacy between the two entries made
by two clerks.
Any help? thanks.
Chris.
|
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |