Dirk Enzmann wrote:
> Using the following .qes and .chk files with EpiData version 3.1,
> EpiData's behavior is strange:
>
> If I use the [-] numeric key to enter missing values in the field
> "schtype", EpiData jumps to the field "male" (i.e. "class" receives no
> focus). If I use the [-] key in field "male", EpiData issues the error
> message "'-' is not a valid floating point value" although missing
> values are defined.
>
> The problem seems to be the movement to the next field after using the
> [-] key, because if I drop field "coder" the problem of field "male"
> does not occur.
>
> Is there a problem in the check file I did overlook or is this a
> problem of EpiData version 3.1? Are there any solutions/suggestions?
>
two problems in above
1. I've noticed that the [-] key sometimes gives this error - the field
is not accepted (the missing values are not recognized as legal). This
seems to be a random occurrence. Closing the file and starting data
entry again has solved the problem for me.
2. The problem of EpiData skipping a field after using [-] to enter a
missing value can be addressed for now by checking whether the skipped
field is blank before proceeding (see below). This problem only arises
when the default missing value has the maximum number of digits in a
numeric field. In Dirk's case, missing value is 9997 or 9999 in a ####
field. Another solution is to make these special missing value codes
negative numbers (e.g. -1) or smaller numbers (e.g. 999), which will be
smaller than the field size. Then there is no skipping. This problem
does not occur with fields of length one.
Jamie Hockin
Public Health Agency of Canada
---------------------------------
* -- .chk --------------------------------
LABELBLOCK
LABEL country
* [0.2 ]
430 Austria
320 Belgium
3870 "Bosnia and Herzegovina"
11 Canada
3850 Croatia
3570 Cyprus
4200 "Czech Republic"
450 Denmark
440 "England and Wales"
3720 Estonia
3580 Finland
330 France
490 Germany
360 Hungary
3540 Iceland
3530 Ireland
390 Italy
3710 Latvia
3700 Lithuania
310 Netherlands
442 "Northern Ireland"
470 Norway
480 Poland
70 Russia
441 Scotland
3810 Serbia
3860 Slovenia
460 Sweden
410 Switzerland
10 "United States"
580 Venezuela
END
LABEL schtype
* [0.3 ]
1 "slot1 (lowest grade)"
2 slot2
3 slot3
4 slot4
5 slot5
6 slot6
7 slot7
9998 "other schooltype"
9999 "no answer"
END
LABEL class
* [0.4 ]
9997 "ambiguous answer"
9999 "no answer"
END
LABEL male
* [1.0 ]
1 male
2 female
7 "ambiguous answer"
9 "no answer"
END
END
* ========================================
BEFORE FILE
HELP "ISRD2 pilot study nation"
END
* ========================================
casenum
* [0.1 ]
KEY
Autosearch casenum
RANGE 1 9999
MUSTENTER
TYPE STATUSBAR "CaseNum = "
END
country
* [0.2 ]
* RANGE 1 9996
BEFORE ENTRY
IF (ISBLANK(country)) THEN
COMMENT LEGAL USE country SHOW
ENDIF
END
COMMENT LEGAL USE country
MUSTENTER
REPEAT
TYPE COMMENT
END
schtype
* [0.3 ]
RANGE 1 9996
MISSINGVALUE -1
* COMMENT LEGAL USE schtype
MUSTENTER
* TYPE COMMENT
END
class
* [0.4 ]
RANGE 1 9996
MISSINGVALUE 9997 9999
* COMMENT LEGAL USE class
MUSTENTER
AFTER ENTRY
IF (class = 9997) THEN
WRITENOTE "ambiguous answer"
ENDIF
END
* TYPE COMMENT
END
male
* [1.0 ]
RANGE 1 2
MISSINGVALUE 7 9
* COMMENT LEGAL USE male
* before entry
* if (isblank(class)) then
* goto class
* endif
* end
MUSTENTER
* TYPE COMMENT
AFTER ENTRY
IF (male = 7) THEN
WRITENOTE "ambiguous answer"
ENDIF
END
END
coder
* [66.0s]
BEFORE ENTRY
if (isblank(male)) then
goto male
endif
TYPE "(alphanumeric)" GREEN
END
MUSTENTER
WRITENOTE "@coder"
END
* -- end .chk --------------------------------