![](https://secure.gravatar.com/avatar/f174b9816ccce31bf5cdb49501b15358.jpg?s=120&d=mm&r=g)
I think this opportunity for open sharing of ideas and experiences is very good and unique
In general I discourage the use of boolean variables. In particular since these in many softwares can have only the values true (Y) or false (N), and not the value "no value".
With the introduction of value labels it is far more efficient to use integer variables, e.g. for the current outbreak: qes file food items intaken : v1 food item 1 (e.g. soup) # v2 food item 2 (e.g. vanilla icecream) # etc
Preparation of chk file is then easy. 1. add checks (#3 in entry) 2. define a value label (+) for v1: 0 no 1 yes 9 missing 3. further define "9" as missing for v1: F9 (edit) and add missingvalue all 9 3. after defining that go to field 1 and press ctrl+c 4. go to v2 (and all other food items) and press ctrl+v now all fields have 0 and 1 defined and 9 as missing value. 5. enter your data
6 read data into analysis
define cases: strategy 1: define case # case = 0 if (vomiting = 1) then case = 1 * remove those vomiting before 24 hours or after 72 hours if (vomiting=1) and (hourvomit < 24) then case = 0 if (vomiting=1) and (hourvomit > 72) then case = 0
* alternatively if we have a fixed date of exposure on 21st of may) if (vomiting=1) and (datevomit < dmy(22,5,2008) then case = 0 if (vomiting=1) and (datevomit > dmy(24,5,2008) then case = 0
* all with diarrhoea are cases: if (diarrhoea = 1) then case = 1
* date of symptoms:
define dateonset <dd/mm/yyyy> If diadate < vomdate then onsetdate = diadate If vomdate < diadate then onsetdate = vomdate If vomdate =diadate then onsetdate = diadate If vomdate =(.) then onsetdate = diadate If diadate =(.) then onsetdate = vomdate
* now we are ready for the first simple analysis: tab case v1 v2 v3 .... etc - all exposure variables..... /oa /t epicurve onsetdate case epicurve onsetdate case /by=sex
The problems reported the latest days, such as: using boolean variables changing from string to numerical etc. a
Can be handled by combining entry and analysis - as was shown on the list by others: a. rewrite the qes file and some conversions are done by EpiData Entry when possible b. take the file into analysis - generate the new numerical variables, e.g. gen i v1 = (upper(v1string) = "Y") c. save the data (savedata newfile) d. with entry create a qes file from the rec file (in Entry - menu tools) e. change the format and labels in qes file and save the qes file f. enter more data - entry will see that the qes file is new and adapt format of rec file.
But the best strategy is to have a standard qes file and rec file from the beginning and then adapt to the current outbreak. Two examples of this is shown in the "field guide under way" in http://www.epidata.org/wiki/index.php/Field_Guide
Exciting to get more news on the ongoing analysis "down under" (seen from my perspective).
regards Jens Lauritsen EpiData Association