[EpiData-list] Command that Can affect Two diffrent Records

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Sep 7 15:20:11 CDT 2010

  One strategy would be take the data into EpiData Analysis and find the 
possible problems there - not in entry.
village: vi
household : hs (actual number of the household in the village, eg a 
number  from 1-1200)
member: mb  (1:female, 2: male):
mosquito net: mqn

in Analysis:
read villagefile
sort vi hs mb

*Strategy 1:
* generate variable with control value
gen i ok = 1
labelvalue ok /1=yes /0=No

* we can look at the previous record with the [_n-1] specifier.
if (mqn <> mqn[_n-1]) and (vi = vi[_n-1]) and (mb = 2) and (mb[_n-1]=1) 
then ok = 0
* now list those records with errors:
list if (ok <> 0) or (ok[_n+1] = 0)

* strategy 2: use stattables:
* table per household:
Stab mqn  /by="vi, hs" /stat="min,max" /close
* now the "file" in memory is replaced by a new file, where the unit is 
village household:
* list discordant pairs:
list if maxmqn <> minmqn

Once you have identified the records with problems, you can find the 
forms and change the data accordingly in EpiData Entry

Jens Lauritsen

On 07/09/2010 15:36, epidata-list at lists.umanitoba.ca wrote:
> Hello,
> I have a questionnaire that i got from interviewing household members.
> However i was making sure that from each household i interview a male and a
> female respondent. You realize that some of the questions here for a
> household have got have the same answers eg Number of persons in the
> household, number of mosquito nets in the household etc.
> So, am inquiring to know whether there is any command i can include in my
> chk file to identify error between two records.  I badly need your help,
> otherwise its so tiresome to check over 1500 records pair by pair.
> Thank you and regards
> Edson B
> Statistician
> River Blindness Elimination Program, Uganda
> _______________________________________________
> EpiData-list mailing list
> EpiData-list at lists.umanitoba.ca
> http://lists.umanitoba.ca/mailman/listinfo/epidata-list

More information about the EpiData-list mailing list