Dear all,
As I am proceeding through my databases, I figured I want to know at which age a patient has gotten a certain scan and also, how old the patient was when they draw blood from him/her.
In order to calculate this, I read the datetime pdf's, this forum and I downloaded the file "personage" from Nick Cox. However, I can't get my calculation right.
These variables am I using: dob1 (double, %tc) and scandate1 (double, %tc).
I tried these different commands:
dofc(dob1)
format dob1 %tm
personage dob1 scandate1, generate(age)
gen age= (dob1-scandate1)/365.25
these commands result at its best in the variable age -4.58e+09.
So I'm feeling I know a little about the possible commands now, but can't get my head around the best command to use.
Thanks for your kind help!
Mariska
As I am proceeding through my databases, I figured I want to know at which age a patient has gotten a certain scan and also, how old the patient was when they draw blood from him/her.
In order to calculate this, I read the datetime pdf's, this forum and I downloaded the file "personage" from Nick Cox. However, I can't get my calculation right.
These variables am I using: dob1 (double, %tc) and scandate1 (double, %tc).
I tried these different commands:
dofc(dob1)
format dob1 %tm
personage dob1 scandate1, generate(age)
gen age= (dob1-scandate1)/365.25
these commands result at its best in the variable age -4.58e+09.
So I'm feeling I know a little about the possible commands now, but can't get my head around the best command to use.
Thanks for your kind help!
Mariska
Comment