Usage
## S3 method for class 'prevalence.msm':
plot(x, mintime=NULL, maxtime=NULL, timezero=NULL,
initstates=NULL, interp=c("start","midpoint"),
censtime=Inf, subset=NULL,
covariates="population", misccovariates="mean",
piecewise.times=NULL, piecewise.covariates=NULL,
xlab="Times",ylab="Prevalence (%)", lwd.obs=1,
lwd.exp=1, lty.obs=1, lty.exp=2, col.obs="blue",
col.exp="red", legend.pos=NULL,
...)
Arguments
x
A fitted multi-state model produced by msm
. mintime
Minimum time at which to compute the observed and
expected prevalences of states.
maxtime
Maximum time at which to compute the observed and
expected prevalences of states.
timezero
Initial time of the Markov process. Expected values
are forecasted from here. Defaults to the minimum of the observation
times given in the data.
initstates
Optional vector of the same length as the number of
states. Gives the numbers of individuals occupying each state at the
initial time, to be used for forecasting expected prevalences.
The default is those observed in the data. These should ad
subset
Subset of subjects to calculated observed prevalences for.
covariates
Covariate values for which to forecast expected
state occupancy. See prevalence.msm
--- if this
function runs too slowly, as it may if there are continuous covariates,
replace cova
misccovariates
(Misclassification models only) Values of covariates on the misclassification
probability matrix. See prevalence.msm
. piecewise.times
Times at which piecewise-constant intensities
change. See prevalence.msm
. piecewise.covariates
Covariates on which the piecewise-constant
intensities depend. See prevalence.msm
. lwd.obs
Line width for observed prevalences. See par
. lwd.exp
Line width for expected prevalences. See par
. lty.obs
Line type for observed prevalences. See par
. lty.exp
Line type for expected prevalences. See par
. col.obs
Line colour for observed prevalences. See par
. col.exp
Line colour for expected prevalences. See par
. legend.pos
Vector of the $x$ and $y$ position,
respectively, of the legend.
...
Further arguments to be passed to the generic plot
function.