invGauss | R Documentation |
invGauss
fits the (randomized drift) inverse Gaussian distribution to survival data. The model is described in Aalen OO, Borgan O, Gjessing HK. Survival and Event History Analysis. A Process Point of View. Springer, 2008. It is based on describing time to event as the barrier hitting time of a Wiener process, where drift towards the barrier has been randomized with a Gaussian distribution. The model allows covariates to influence starting values of the Wiener process and/or average drift towards a barrier, with a user-defined choice of link functions.
invGauss(formula.mu, formula.c = ~1, link.mu = identity, link.c = exp, data, mu = TRUE, tau = TRUE, verbose = FALSE, protect = FALSE, opti.method = "BFGS", use.gradient = TRUE, link.mu.deriv = function(x) 1, link.c.deriv = exp)
formula.mu |
Standard survival formula, like |
formula.c |
Formula without the left hand side, like |
link.mu |
Link function used with |
link.c |
Link function used with |
data |
Data frame to be used. |
mu |
If you need to supply your own initial value for |
tau |
Like |
verbose |
If TRUE, |
protect |
Somewhat experimental. If TRUE, possible negative values in the likelihood are "eliminated" to avoid crashes. Probably most useful when link is identity. |
opti.method |
|
use.gradient |
By default, |
link.mu.deriv |
If the user modifies |
link.c.deriv |
If the user modifies |
invGauss
uses by default analytical gradients in the optimization, although this does not appear to make much difference. When use.gradient = TRUE
, if the user changes one of the link functions, the corresponding derivative must also be supplied. For instance, if link.mu
is set to exp
, so should link.mu.deriv
. Similarly, if, for instance, link.c
is changed to identity
, then link.c.deriv
should be function(x) 1
.
See web page http://www.uib.no/smis/gjessing/projects/invgauss/ for more details.
An object of class invGauss
is returned. This is a list, where the most important elements are:
Estimated coefficients
The variance-covariance matrix of the estimated coefficients
The maximized log-likelihood
AIC value
The summary
function provides more details about the result, in particular coefficient values with standard errors, Z statistic, and Wald tests.
(There is also an undocumented invGauss:::predict.invGauss
function, but use it at your own risk...)
For some datasets, invGauss
may have a hard time converging. This may be due to either inappropriate parameter starting values or a hazard shape that is incompatible with the hitting time distribution. Running a simpler model or setting the starting values manually may help. Sometimes, the exact choice of zero on the time scale may be important since some of the model hazards increase steeply immediately after zero. Adding or subtracting a small value from all event/censoring times may help. The new default optimization method "BFGS" seems to do a better job than "Nelder-Mead".
Further information is found on the web page.
Hakon K. Gjessing
Professor of Biostatistics
Division of Epidemiology
Norwegian Institute of Public Health
hakon.gjessing@fhi.no
http://www.uib.no/smis/gjessing
Aalen OO, Borgan O, Gjessing HK. Survival and Event History Analysis: A Process Point of View. Springer-Verlag, 2008.
Aalen OO and Gjessing HK. Understanding the Shape of the Hazard Rate: A Process Point of View. Statistical Science, 2001, Vol. 1, No. 1, 1-22.
Aalen OO. Phase type distributions in survival analysis. Scandinavian Journal of Statistics, 1995, Vol. 22, Issue 4, 447-463.
Web Site: http://www.uib.no/smis/gjessing/projects/invgauss/
summary.invGauss
# Simple run: data(d.oropha.rec) res <- invGauss(formula.mu = Surv(time, status) ~ 1, data = d.oropha.rec) summary(res) # Use covariates for c, with exponential link function data(d.oropha.rec) res <- invGauss(formula.mu = Surv(time, status) ~ 1, formula.c = ~ cond + nstage + tstage, data = d.oropha.rec) # MODEL 5 (TABLE 10.2, page 412) IN SPRINGER BOOK summary(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.