Hello everyone,
I have a dataset like this-
input str4 hsn double cdob str10 bqdate_1
"1004" 19251 " 4/16/2026"
"1005" 19227 " 4/16/2011"
"1007" 19235 " 4/16/2011"
"1009" 19247 " 4/16/2013"
"1013" 19244 " 4/16/2021"
end
format %td cdob
cdob is the date of birth, and bqdate_1 is date of administering the data. Now I need to find out the age from the difference of these two variables. I know I need to change the format of these two variables, but I'm not sure exactly what to do for that. After changing the format I need to calculate differences between dates in months by using mofd prefix. Can someone help me to solve this problem? Thanks in advance.
Fahmida
Related Posts with Calculating Age from two variables
Sobel test or bootstrapping for testing mediationDear everyone, I am testing a mediating model and after running my multiple fixed effects regressio…
Rare event models with panel dataDear Statalist users, I am analysing the probability of doctors to accept a clinical job offer usi…
PPML Country Pair Fixed EffectsHi All, I am trying to run a bilateral trade gravity model using PPML and trying to control for cou…
command for Wooldridge Test for Strict ExogeneityHello..i am stata 14 user. I have to run "The Wooldridge Test for Strict Exogeneity", kindly share m…
Identifying 'nearest neighbours' without using teffectsHi, I have data for almost 7,000 organisations. I want to use say, 6 variables, to identify the 60…
Subscribe to:
Post Comments (Atom)
0 Response to Calculating Age from two variables
Post a Comment