R library invGauss for fitting a Mixture Inverse Gaussian distribution to survival data.

Note:

invGauss has been tested to a limited extent. Although I have tried to avoid bugs, I cannot take responsibility for any incorrect behavior. The library has been compiled with R version 2.12.1, but should run under most versions.

Comments or bugs can be sent to hakon.gjessing@fhi.no.

Last updated: Apr. 26. 2011

Background:

invGauss is designed to fit an Inverse Gaussian distribution to survival data (with possible censoring). The Inverse Gaussian distribution is derived as the barrier hitting distribution of a Brownian Motion with drift. To achieve higher flexibility the drift parameter m itself is modeled as a Gaussian random variable, giving different drift parameters for different individuals. Since some individuals will have a drift away from the barrier, the resulting hitting time distribution will be defective, i.e. it integrates to less than one. The model also incorporates covariates. Covariates can be included in the form

mi = g(aTxi)

ci = h(bTyi)

mi and ci are the individual values of drift and initial distance from the barrier, respectively, for indiviual i. xi and yi are covariate vectors and g and h are link functions. Typical link functions can be identity or exp. invGauss will estimate both parameter vectors a and b, in addition to τ, which is the standard deviation of the Gaussian random variable describing drift. The xi and yi covariate vectors can “overlap” in that they can consist of the same or different covariates.


The model is intended as an illustration of how one can model an underlying unobserved disease process where only the final outcome is observed.
For more details, we refer to

The program is written by Håkon K. Gjessing.

Installation:

invGauss is implemented as a standard R library. Download one of the following:



and place it in the working directory of your R session. Then, in R, use

install.packages(repos = NULL, pkgs = 'invGauss_1.0.tar.gz')

to install the library.

(Under Windows, one can also use the menu Packages > Install package(s) from local zip files...)

Whenever starting a new R session, use library(invGauss) to load the library.

Usage:

The dataset d.oropha.rec is included in the library. To make it available, use

> data(d.oropha.rec)

invGauss can then be run with, for instance,


> res <- invGauss(formula.mu = Surv(time, status) ~ 1, formula.c = ~ cond + nstage + tstage, link.c = exp, data = d.oropha.rec)

which corresponds to Model 5 in Table 10.2, page 412 in Aalen, Borgan, Gjessing (2008).


The results can be summarized with


> summary(res)

which should produce this result.

Another example would be

> res1 <- invGauss(formula.mu = Surv(time, status) ~ sex + cond + nstage + tstage, formula.c = ~ sex + cond + nstage + tstage, link.c = exp, data = d.oropha.rec)

which corresponds to Model 4 in Aalen, Borgan, Gjessing (2008).


More details about usage can be found in the

Help file

Here are some details of the estimation procedure.

Håkon K. Gjessing
Professor of biostatistics
Division of epidemiology
Norwegian Institute of Public Health
Email: hakon.gjessing@fhi.no
http://www.uib.no/smis/gjessing


Web counter: