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
approach to do lasso inference for survival model using Poisson regressionI was trying to do lasso inference for survival ,model. The variables of interest are : AMIS, BMIS D…
Plotting local variablesHi all, so my problem is the following. I am creating this difference: valore_aggiunto_`k'[1]- valo…
Variable creation based on same variableHi. I need help creating a variable based on the same variable data from a different row. Basically …
RFC (request for comments) on new package "require.ado"Hi all, There is an undocumented ado-file in ftools which I found quite useful for my own work, so …
Testing coefficientsDear statalists, I am running 12 different regressions of political risk factors on the amount of M…
Subscribe to:
Post Comments (Atom)
0 Response to Generating age variable in pannel dataset
Post a Comment