[EpiData-list] Re: DEFINE var not seen in file structure

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Thu Feb 28 06:23:44 CST 2008


 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 at lists.umanitoba.ca
To: epidata-list at 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 at 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 at lists.umanitoba.ca

You can reach the person managing the list at
    epidata-list-owner at 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 at lists.umanitoba.ca)


----------------------------------------------------------------------

Message: 1
Date: Sun, 24 Feb 2008 11:04:40 +0100
From: epidata-list at 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 at lists.umanitoba.ca
Message-ID: <47C14138.2070103 at 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 at lists.umanitoba.ca
http://lists.umanitoba.ca/mailman/listinfo/epidata-list


End of EpiData-list Digest, Vol 52, Issue 12
********************************************



 



More information about the EpiData-list mailing list