[EpiData-list] CHK file with calculations does not work as it did in EpiInfo

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Mar 4 13:10:27 CST 2008


Unless, something go lost, there is surely something missing here:

  IF N9SUICIDE = or (N9SUICIDE = 2 AND TOTAL >= 16) or TOTAL > 42


Hans


epidata-list at lists.umanitoba.ca wrote:
> Hi,
>
> I wonder if someone can spot the syntax problem in this CHK file for the Beck Depression inventory. I've struggled for hours to get it to work the way it did under Epi Info. Basically, there are three conditions in an IF statement. I've tried with the two simple conditions alone and the script works (condition at the beginning & at the end). Combining conditions always gives the 'atrisk' calculated variable the answer "N". Is there a limitation or syntax difference in Epidata??
>
> AFTER RECORD
>   TOTALPG1=SAD+N2DISCOURA+N3FAILURE+N4SATISFAC+N5GUILT+N6PUNISHED+N7DISAPPOI+N8SELFCRIT+N9SUICIDE+N10CRY+N11IRRITAT
>   TOTALPG2=2INTPPL+N13DECISIO+N14LOOKWOR+N15CANWORK+N16SLEEP+N17TIRED+N18APPETIT+N19WEIGHT+N20WORRYHL+N21INTSEX
>   TOTAL=TALPG1 + TOTALPG2
>   IF N9SUICIDE = or (N9SUICIDE = 2 AND TOTAL >= 16) or TOTAL > 42
>    THEN
>     ATRISK="
>    ELSE
>     ATRISK="
>   ENDIF
> END
>   

-- 
Hans L Rieder, MD, MPH
Jetzikofenstr. 12
3038 Kirchlindach
   Switzerland

Tel: +41 31 829 4577
Mob: +41 79 321 9122
Web: http://www.tbrieder.org




More information about the EpiData-list mailing list