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]

Re: st: generating age using dates


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: generating age using dates
Date   Fri, 17 Dec 2010 17:27:20 +0000 (GMT)

--- On Fri, 17/12/10, martine etienne wrote:
> the dates look pretty normally distributed, 

It is not the shape of the distribution that is
relevant but the actual values. We cannot look at
them, and we don't know anything about your data,
but you should know the context and be able to 
look at these values and see if they are plausable.

> both variables are long format:
> survey_date 
>    long   %dD_m_Y   
>             
> q1_dob2     
>    long   %td   

When storing dates, that is done in years or weeks 
or quarters or... since some fixed date. You need to 
make sure that both variables use the same unit. The 
fact that one variable is in %dD_m_Y  and the other 
in %td suggest that this might be the problem. Take a 
look at the exact numerical values of these variables
(i.e. not the dates but the numbers).

Look at -help dates- for different conversion tools
to move one date type to another.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   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