check.dist {eha} | R Documentation

## Graphical goodness-of-fit test

### Description

Comparison of the cumulative hazards functions for a semi-parametric and a parametric model.

### Usage

    check.dist(sp, pp, main = NULL, col = NULL, printLegend = TRUE)

### Arguments

`sp` | An object of type "coxreg", typically output from `coxreg`
`pp` | An object of type "phreg", typically output from `phreg`
`main` | Header for the plot. Default is distribution and "cumulative hazard function"
`col` | Line colors. should be `NULL` (black lines) or of length 2
`printLegend` | Should a legend be printed? Default is `TRUE`.

### Details

For the moment only a graphical comparison. The arguments `sp` and `pp` may be swapped.

### Value

No return value.

### Author(s)

Göran Broström

### See Also

`coxreg` and `phreg`.

### Examples

    data(mort)
    oldpar <- par(mfrow = c(2, 2))
    fit.cr <- coxreg(Surv(enter, exit, event) ~ ses, data = mort)
    fit.w <- phreg(Surv(enter, exit, event) ~ ses, data = mort)
    fit.g <- phreg(Surv(enter, exit, event) ~ ses, data = mort,
    dist = "gompertz")
    fit.pch <- phreg(Surv(enter, exit, event) ~ ses, data = mort,
    dist = "pch", cuts = c(5, 10, 15))
    fit.ev <- phreg(Surv(enter, exit, event) ~ ses, data = mort,
    dist = "ev")
    check.dist(fit.cr, fit.w)
    check.dist(fit.cr, fit.g)
    check.dist(fit.cr, fit.pch)
    check.dist(fit.cr, fit.ev)
    par(oldpar)

[Package eha version 2.6.0 Index]