Thank you Jens. This is most helpful. Sorry for not replying sooner, had problems with getting connected to the net.
I will revise the QES and CHK file accordingly and come back if there are further issues.
Again, Many thanks
Kindest Regards
SK
-----Original Message-----
From: epidata-list-request(a)lists.umanitoba.ca
To: epidata-list(a)lists.umanitoba.ca
Sent: Sun, 24 Feb 2008 8:04 pm
Subject: EpiData-list Digest, Vol 52, Issue 12
Send EpiData-list mailing list submissions to
epidata-list(a)lists.umanitoba.ca
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.umanitoba.ca/mailman/listinfo/epidata-list
or, via email, send a message with subject or body 'help' to
epidata-list-request(a)lists.umanitoba.ca
You can reach the person managing the list at
epidata-list-owner(a)lists.umanitoba.ca
When replying, please edit your Subject line so it is more specific
than "Re: Contents of EpiData-list digest..."
EpiData-list mailing list
___________________________________
Today's Topics:
1. DEFINE var not seen in file structure. Answer: Define in
entry and in analysis have different consequences
(epidata-list(a)lists.umanitoba.ca)
----------------------------------------------------------------------
Message: 1
Date: Sun, 24 Feb 2008 11:04:40 +0100
From: epidata-list(a)lists.umanitoba.ca
Subject: [EpiData-list] DEFINE var not seen in file structure. Answer:
Define in entry and in analysis have different consequences
To: epidata-list(a)lists.umanitoba.ca
Message-ID: <47C14138.2070103(a)epidata.dk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
There are two types of variables:
1. Variables which can be saved in files.
In Entry these are defined in the qes file, e.g.
var1 Label for this variable ####
After creating the data file (rec file) and entering data, the data
are stored in a rec file
In Analysis variables can be created in two ways:
a.
Define var1 ######
var1 = integer((today-dob)/365.25)
label var1 "Age at date of calculation"
b
gen i var1 = integer((today-dob)/365.25)
label var1 "Age at date of calculation"
c
In both instances (a+b) the values are only kept further on if you
issue a saving command:
savedata
2. Temporary variables - which are only kept in memory
In entry these are defined as SK did:
> BEFORE FILE
> DEFINE var1 #####
> DEFINE var2 #####
> END
In analysis these are defined : (notice "global")
define var1 ##### global
Temporary variables cannot be saved to a rec file unless the content is
transferred to a variable saved in a data file. Sometimes we call
variables in data files for "fields" in contrast to what is only in
memory. SK could argue that define should do the same in analysis and
entry to avoid the confusion.
In other words now SK can get the results of the calculation saved for
analysis by:
Add to the qes file
aged Age in days #####
agem Age in months ####
chk file.
remove the "define" in before file but keep the calculation "let" in
the "after entry" block
and add this
aged
noenter
end
agem
noenter
end
regards
Jens Lauritsen
EpiData Association
------------------------------
________________________________________
EpiData-list(a)lists.umanitoba.ca
http://lists.umanitoba.ca/mailman/listinfo/epidata-list
End of EpiData-list Digest, Vol 52, Issue 12
********************************************
Merci beacoup - I realised that obvious solution just after I posted the question!! Sorry!
Dr Josh Davis
NH&MRC Scholar
Menzies School of Health Research
Staff Specialist in Infectious Diseases and General Medicine
Royal Darwin Hospital
-----Original Message-----
From: epidata-list-bounces(a)lists.umanitoba.ca [mailto:epidata-list-bounces@lists.umanitoba.ca] On Behalf Of epidata-list-request(a)lists.umanitoba.ca
Sent: Thursday, 28 February 2008 3:43 AM
To: epidata-list(a)lists.umanitoba.ca
Subject: EpiData-list Digest, Vol 52, Issue 13
Send EpiData-list mailing list submissions to
epidata-list(a)lists.umanitoba.ca
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.umanitoba.ca/mailman/listinfo/epidata-list
or, via email, send a message with subject or body 'help' to
epidata-list-request(a)lists.umanitoba.ca
You can reach the person managing the list at
epidata-list-owner(a)lists.umanitoba.ca
When replying, please edit your Subject line so it is more specific
than "Re: Contents of EpiData-list digest..."
EpiData-list mailing list
___________________________________
Today's Topics:
1. Incompatible Key Variables (epidata-list(a)lists.umanitoba.ca)
2. Problem with label values (epidata-list(a)lists.umanitoba.ca)
3. Re: Incompatible Key Variables (epidata-list(a)lists.umanitoba.ca)
4. Re: Problem with label values (epidata-list(a)lists.umanitoba.ca)
----------------------------------------------------------------------
Message: 1
Date: 27 Feb 2008 06:38:27 -0000
From: epidata-list(a)lists.umanitoba.ca
Subject: [EpiData-list] Incompatible Key Variables
To: epidata-list-request(a)lists.umanitoba.ca
Cc: epidata-list(a)lists.umanitoba.ca
Message-ID: <20080227063827.17613.qmail(a)webmail47.rediffmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Dear Epidata users,
I am trying to relate a child file (gm.rec which is growth monitoring data) with the parent file (Under5b.rec, an under 5 children file)
The card variable of Under5b.rec is <IDNUM> type while it is numeric in the GM.rec file. After giving the MERGE CARD /FILE=UNDER5B.REC command, I get the following message;
Incompatible key variables.
Current file: Card of type Float
Merge file: Card of type Integer
Is there any solution for this problem. Actually IDNUM (automatic counter) is also a numeric variable. EPI6 relates these without any problem.
Can any one help please.
I am attaching a child.zip file (Under5b.rec and gm.rec in the form of child.zip) for the demonstration of the problem.
Waiting for you response.
With regards
Dr. Shavinder SinghÂ
I have several list fields in my datasheet which have more than 9 possible values, and I want to make a label list reflecting this. However. Epidata seems to only allow up to 9. I can;t find documentation on this, but trial and error tells me.
Are there any possible solutions?
(to clarify, I have:
LABEL label_resid
1 abc
2 ddd
3 kk
4 ggg
(and then up to 12, and 99 for unknown)
99 unknown
END
Dr Josh Davis
NH&MRC PhD Scholar
Menzies School of Health Research and Charles Darwin University
Darwin, NT
Staff Specialist in Infectious Diseases and General Medicine
Royal Darwin Hospital
________________________________
Dear Epidata users,
I am trying to relate a child file (gm.rec which is growth monitoring data) with the parent file (Under5b.rec, an under 5 children file)
The card variable of Under5b.rec is <IDNUM> type while it is numeric in the GM.rec file. After giving the MERGE CARD /FILE=UNDER5B.REC command, I get the following message;
Incompatible key variables.
Current file: Card of type Float
Merge file: Card of type Integer
Is there any solution for this problem. Actually IDNUM (automatic counter) is also a numeric variable. EPI6 relates these without any problem.
Can any one help please.
I am attaching a child.zip file (Under5b.rec and gm.rec in the form of child.zip) for the demonstration of the problem.
Waiting for you response.
With regards
Dr. Shavinder Singh
There are two types of variables:
1. Variables which can be saved in files.
In Entry these are defined in the qes file, e.g.
var1 Label for this variable ####
After creating the data file (rec file) and entering data, the data
are stored in a rec file
In Analysis variables can be created in two ways:
a.
Define var1 ######
var1 = integer((today-dob)/365.25)
label var1 "Age at date of calculation"
b
gen i var1 = integer((today-dob)/365.25)
label var1 "Age at date of calculation"
c
In both instances (a+b) the values are only kept further on if you
issue a saving command:
savedata
2. Temporary variables - which are only kept in memory
In entry these are defined as SK did:
> BEFORE FILE
> DEFINE var1 #####
> DEFINE var2 #####
> END
In analysis these are defined : (notice "global")
define var1 ##### global
Temporary variables cannot be saved to a rec file unless the content is
transferred to a variable saved in a data file. Sometimes we call
variables in data files for "fields" in contrast to what is only in
memory. SK could argue that define should do the same in analysis and
entry to avoid the confusion.
In other words now SK can get the results of the calculation saved for
analysis by:
Add to the qes file
aged Age in days #####
agem Age in months ####
chk file.
remove the "define" in before file but keep the calculation "let" in
the "after entry" block
and add this
aged
noenter
end
agem
noenter
end
regards
Jens Lauritsen
EpiData Association
Dear Epidata Users
Hope you can help me understand why this problem is arising.
I have created a CHK file with the commends:
BEFORE FILE
??? DEFINE var1
??? DEFINE var2
END
....more code----
var1 and var2 are child age in days and months respectively, computed from date of admission-date of birth;
...code---
dateadm
??? AFTER ENTRY
??? ?? LET aged=dateadm-dob
??? ?? LET agem=(dateadm-dob)/30
??? END
END
Now when I try to "File Structure" to see the variables created in the database, I do not see these 2 new variables. Even in Epidata Analysis, after reading the file, these variables do not appear in the variable lsit.
Have I missed something?
Thanks
SK
________________________________________________________________________
More new features than ever. Check out the new AOL Mail ! - http://webmail.aol.com
EpiData Entry users with a Windows Vista machine may experience a problem in reading the EpiData Entry Help file. A plug can be obtained from the MS site that will fox the problem. An EpiData introduction course participant kindly provided me with the link where to get it and I wanted to share it for the record in the EpiData list:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=6eb…
Hans
I have a problem downloading the current version. Any
time I download it I am not able to luanch it.A
message will appear that it is currupted. It is the
same for the analysis one too.
Thank
Joe.
Akolgo Asampana Joseph
Nayag and Sons L .C.S
P.O Box 415
Bolga
Phone +233-244476218
Ghana
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
This proposed solution has the problem that ID is then a string
variable, which will be confusing when you transfer it to STATA, SPSS
etc. Another solution would be to not worry about the leading zeros
until you have transferred it into STATA, at which point you could use
the STATA format command to force it to display as 3 digits.
Regards
Dr Josh Davis
NH&MRC Scholar
Menzies School of Health Research
Staff Specialist in Infectious Diseases and General Medicine
Royal Darwin Hospital
-----Original Message-----
From: epidata-list-bounces(a)lists.umanitoba.ca
[mailto:epidata-list-bounces@lists.umanitoba.ca] On Behalf Of
epidata-list-request(a)lists.umanitoba.ca
Sent: Sunday, 17 February 2008 3:33 AM
To: epidata-list(a)lists.umanitoba.ca
Subject: EpiData-list Digest, Vol 52, Issue 7
Send EpiData-list mailing list submissions to
epidata-list(a)lists.umanitoba.ca
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.umanitoba.ca/mailman/listinfo/epidata-list
or, via email, send a message with subject or body 'help' to
epidata-list-request(a)lists.umanitoba.ca
You can reach the person managing the list at
epidata-list-owner(a)lists.umanitoba.ca
When replying, please edit your Subject line so it is more specific
than "Re: Contents of EpiData-list digest..."
EpiData-list mailing list
___________________________________
Today's Topics:
1. Re: forcing 3-digit id numbers (epidata-list(a)lists.umanitoba.ca)
----------------------------------------------------------------------
Message: 1
Date: Sat, 16 Feb 2008 00:42:00 +0100
From: epidata-list(a)lists.umanitoba.ca
Subject: Re: [EpiData-list] forcing 3-digit id numbers
To: epidata-list(a)lists.umanitoba.ca
Message-ID: <47B62348.2070106(a)tbrieder.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Vicky:
I reproduced your problem, and while perhaps awkward, this seems to be a
possible solution:
Make an IDN as a numeric field and your ID as a text field:
QES:
idn ###
id ___
sex #
In the CHK file you write:
idn
RANGE 1 150
MUSTENTER
AFTER ENTRY
id=idn
IF idn<10 THEN
id="00"+id
ENDIF
IF (idn>9) and (idn<100) THEN
id="0"+id
ENDIF
END
END
id
KEY UNIQUE 1
NOENTER
END
and you have your ID as unique identifier in the format you want it to
be.
Regards,
Hans
epidata-list(a)lists.umanitoba.ca wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">I am
> using a unique ID for individuals in a study. The ID must be between
> 001 and 150 and it is a 3-character string field to ensure 054 is
> entered, for instance, rather than 54.
> Certain numbers can be entered with fewer than 3 digits without
> generating an error message. Without trying every possible
> combination, it seems that these numbers are 1, 10, 11, 12, 13, 14 and
> 15. The thing that these seven numbers have in common is that they
> could all be extended to 3 digits by filling in only zeroes, and still
> meet the criteria for the field (100, 100 again, 110, 120, 130, 140,
> 150). 160 is too big for the range, so 16 generates an error message.
> 200 is too big, so 2 is not allowed. This is just a guess to explain
> why these seven numbers slip through the filter.
> If I'm right, is there anything I can do about it? If I'm wrong,
> what's the explanation?
> Thanks for your help,
> Vicky Simms
>
> King's College London
>
>
> </div>
--
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
------------------------------
________________________________________
EpiData-list(a)lists.umanitoba.ca
http://lists.umanitoba.ca/mailman/listinfo/epidata-list
End of EpiData-list Digest, Vol 52, Issue 7
*******************************************
I am using a unique ID for individuals in a study. The ID must be
between 001 and 150 and it is a 3-character string field to ensure 054
is entered, for instance, rather than 54.
Certain numbers can be entered with fewer than 3 digits without
generating an error message. Without trying every possible
combination, it seems that these numbers are 1, 10, 11, 12, 13, 14 and
15. The thing that these seven numbers have in common is that they could
all be extended to 3 digits by filling in only zeroes, and still meet
the criteria for the field (100, 100 again, 110, 120, 130, 140, 150).
160 is too big for the range, so 16 generates an error message. 200 is
too big, so 2 is not allowed. This is just a guess to explain why these
seven numbers slip through the filter.
If I'm right, is there anything I can do about it? If I'm wrong, what's
the explanation?
Thanks for your help,
Vicky Simms
King's College London