Hello Everyone!
I was wondering if you could assist me in generating an age variable in a panel dataset I am working on.
I have the date of the birth (date_birth) as well as the year variable (that indicates the year of the observation).
I was trying to do (year - data_birth)/365.25
However that is probably not working because while the year is yyyy, the date_birth is dd/mm/yyyy. How do I make the conversion?
The specific date of the year we can use to calculate the age is not important for my analysis, as long as it is standard in the data.
Also not sure if it is important, but I am using Stata 13
Related Posts with Generating age variable in pannel dataset
Generating time series of (quarter) date variables for the period between two date variables: beginning and end of ownershipHi, I would much appreciate your assistance with the below question. Please, I have data set that …
Out of sample prediction using a two way fixed effectDear members, When using a two way fixed effect model, "i.year" is added in the command which estim…
invalid numlist has missing values Error in forestplotHi, Recently, when I use metan or admetan on aggregated data, there is always an error with the fore…
SAS to STATAI'm hoping someone can help me recreate the following SAS code in STATA. if first.studyid_adult the…
Creating a column out of the results from a loopI have a panel data and I have used a loop to tabulate the standard errors by stacking 3 columns tog…
Subscribe to:
Post Comments (Atom)
0 Response to Generating age variable in pannel dataset
Post a Comment