# [R] significant difference between Gompertz hazard parameters?

David Winsemius dwinsemius at comcast.net
Sun Jul 1 16:40:46 CEST 2012

```On Jul 1, 2012, at 12:04 AM, piltdownpunk wrote:

> Hello, all.
>
> I have co-opted a number of functions that can be used to plot the
> hazard/survival functions and associated density distribution for a
> Gompertz
> mortality model, given known parameters.  The Gompertz hazard model
> has been
> shown to fit relatively well to the human adult lifespan.  For
> example, if I
> wanted to plot the hazard (i.e., mortality) functions:
>
> pop1 <- function (t)
> 	{
> 		x=c(0.03286343, 0.04271132)
> 		a3<-x
> 		b3<-x
> 		shift<-15     # only considering mortality after 15 years
>
> 		h.t<-a3*exp(b3*(t-shift))
> 		return<-h.t
> }
>
> pop2 <- function (t)
> 	{
> 		x=c(0.02207778, 0.04580059)
> 		a3<-x
> 		b3<-x
> 		shift<-15     # only considering mortality after 15 years
>
> 		h.t<-a3*exp(b3*(t-shift))
> 		return<-h.t
> }
>
> ylab.name <- expression(paste(italic(h),"(",italic(a),")"))
> plot(seq(15,80,1),pop1(seq(15,80,1)),type='l',ylab=ylab.name,xlab='Age
> (years)',ylim=c(0,0.8))
> lines(seq(15,80,1),pop2(seq(15,80,1)),lty=2)
>
> How may I test for a significant difference in the hazard parameters
> that
> define the mortality experience for these two populations?  Thanks in
>

You cannot test for differences in pre-specified parameters. These are
by definition, "different". If you supply some data, possibly
generated through simulations, you can test for differences in fit
using parametric fits. The survival package offers facilities for
fitting,  and in the Archives you can find several responses from
Terry Therneau to questions about fitting data to Gompertz or Gompertz-
Makeham distributions.
>

--

David Winsemius, MD
West Hartford, CT

```