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 (August 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 3 Aug 2006 22:52:47 -0700
Reply-To:     David L Cassell <davidlcassell@MSN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David L Cassell <davidlcassell@MSN.COM>
Subject:      Re: Hazard Function plot for Weibull and Exponential
In-Reply-To:  <200608031324.k73AkJZM021883@mailgw.cc.uga.edu>
Content-Type: text/plain; format=flowed

carolfinnes@HOTMAIL.CO.UK wrote: > >Hi SAS-l'ers, >Does anyone have some SAS code which will allow me to a plot of the hazard >functions for Weibull for different values of alpha and also the >exponential? >Thanks >Carol

The hazard function for any non-negative random variable T which is used as the time until failure with cumulative distribution function F(t) and probabiltiy distribution function f(t) is just:

h(t) = f(t) / ( 1 - F(t) )

So you can do this for any non-negative random variable which is spit out using the PDF() and CDF() functions.

For any given time t, and specified parameters alpha (shape parameter) and lambda (scale parameter), you have the value of the hazard function:

h = pdf('WEIBULL',t,alpha,lambda) / ( 1 - CDF('WEIBULL',t,alpha,lambda) );

This approach works well for the exponential too, since the CDF() and PDF() functions work for the keyword 'EXPONENTIAL' too.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


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