Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: generating age using dates


From   martine etienne <martieluvsu@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: generating age using dates
Date   Fri, 17 Dec 2010 07:26:46 -0800 (PST)

Hi Statlisters,
I am trying to generate age using the following variables:

"survey_date"=survey date

"q1_dob2"=date of birth

I started with the following command:
gen nage= survey_date- q1_dob2
gen age= nage/365.4
but I'm stuck at this point because it looks like the numbers are very similar 
to each other, ie..I have a sample of 287 and over 200 are 50 plus....

thanks for any help!
martine


      
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index