LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 19 Sep 2007 21:05:00 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: RES: Finding actual age
Comments: To: tj_noreply@YAHOO.COM
In-Reply-To:  <>
Content-Type: text/plain; format=flowed

I dont have time to go into very deep but you can study this problem when a leap year is involved:

data _null_;

IntAge = floor((intck('month',"03MAR2000"d,"03MAR2002"d) - (day("03MAR2002"d) < day("03MAR2000"d))) / 12);

YrdifAge = floor(yrdif("03MAR2000"d,"03MAR2002"d,"ACT/ACT"));

put IntAge = YrdifAge = ; run;

Toby Dunn

Compromise is like telling a lie, it gets easier and easier. Each comprimise you make, that becomes your standard.

Perfection doesnt exist, once you reach it, its not perfect anymore. It means something else.

From: T J <tj_noreply@YAHOO.COM> Reply-To: T J <tj_noreply@YAHOO.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Re: RES: Finding actual age Date: Wed, 19 Sep 2007 16:18:34 -0400

On Wed, 19 Sep 2007 20:07:53 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote: ====IN PART ============

>T J , > >YrDif Function does have some pitfalls and it will only check the number of >years between the birth year and the ending year. In other words you could >be adding an extra year to someone because the ending year is before their >actialy birthdate. Under optimal conditions calculating age this was is a >rough approximation at best. > >

Can you show me an example for the situation you mentioned above?

I would be interested to know the other pitfalls of this function as well.


_________________________________________________________________ Share your special parenting moments!

Back to: Top of message | Previous page | Main SAS-L page