R: Plots of multi-state models

plot.msm {msm} | R Documentation

## Plots of multi-state models

### Description

This produces a plot of the expected probability of survival against time, from each transient state. Survival is defined as not entering an absorbing state.

### Usage

    ## S3 method for class 'msm'
    plot(x, from, to, range, covariates, legend.pos, xlab="Time",
                       ylab="Fitted survival probability", lwd=1, ...)

### Arguments

`x` | Output from `msm`, representing a fitted multi-state model object.
`from` | States from which to consider survival. Defaults to the complete set of transient states.
`to` | Absorbing state to consider. Defaults to the highest-labelled absorbing state.
`range` | Vector of two elements, giving the range of times to plot for.
`covariates` | Covariate values for which to evaluate the expected probabilities. This can either be: the string `"mean"`, denoting the means of the covariates in the data (this is the default), the number `0`, indicating that all the covariates should be set to zero, or a list of values, with optional names. For example `list (60, 1)` where the order of the list follows the order of the covariates originally given in the model formula, or a named list, `list (age = 60, sex = 1)`
`legend.pos` | Vector of the x and y position, respectively, of the legend.
`xlab` | x axis label.
`ylab` | y axis label.
`lwd` | Line width. See `par`.
`...` | Other arguments to be passed to the generic `plot` and `lines` functions.

### Author(s)

C. H. Jackson chris.jackson@mrc-bsu.cam.ac.uk

### See Also

`msm`

[Package msm version 1.6.8 Index]