- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Phan,
I failed to mention that the code I suggested requires SAS 9.3. I presume you are on an older version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear Art,
Thanks for the follow-up. Indeed, I am working on 9.3.
In fact, this message from log file: character values have been converted to numeric values at the places given by ... referred for another (I'm sorry to confuse you).
Lately, I will send you a log file that may help you to understand the issue when I ran the code.
I am in Vancouver, a bit inconvenience at my workplace for Internet.
Phan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Not a problem. I'm in Toronto thus at least your response won't have to go through Customs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear Art,
Please kindly see the log. I will see a stat person tomorrow morning and will fu you.
8617 /*person-year*/
8618 py_dead1=yrdif(farvdt, death_date, 'act/act');
8619 py_dead2=datdif(farvdt, death_date, 'act/act');
8620
8621
8626 run;
NOTE: Invalid argument to function YRDIF at line 8618 column 10.
NOTE: Invalid argument to function DATDIF at line 8619 column 10.
Thanks,
Phan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Are both farvdt and death_date SAS date fields? All three of the following work for me:
data have;
informat farvdt death_date date9.;
input farvdt death_date;
/*person-year*/
py_dead1=yrdif(farvdt, death_date, 'act/act');
py_dead2=datdif(farvdt, death_date, 'act/act');
py_dead3=yrdif(farvdt, death_date, 'age');
cards;
1jan2010 10may2012
10jun2011 25oct2012
;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear Art, good morning!
Pls. kindly see the date SAS. I will fu with you late today, I hope to show the issue to my colleague. Thanks.
Phan
DEATH_
Obs ID FARVDT DATE
16 310 01MAR2010 .
17 340 28APR2008 .
18 350 22NOV2006 27MAR2008
19 360 23FEB2004 .
20 370 07OCT2009 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You would get the error due to the missing dates. What date would you base person_years on for someone who hasn't died?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear Art,
You are absolutely correct!
I use another date (as this dataset is a bit confusion) the dead_date do not reflect for death and I am asked to use fu_time. And the code work fine.
I much appreciate and thank you very much, Art, and thanks everyone's times for discussion.
Phan S.
- « Previous
-
- 1
- 2
- Next »