| plot.aj {changeLOS} | R Documentation |
Draws a plot for an object of class 'aj' in the active graphics
device: Transition probabilities are plotted as a function of
time. The time origin is determined by the object of the class aj.
plot.aj(x,
from,
to,
xlab=expression(paste(Time, " ", italic(t))),
ylab= eval(substitute(expression(paste("Estimate of ",
P[{a}][{b}], "(", italic(s), ",", italic(t), ")")),
list(a=from[1],b=to[1],s=x$start))),
xlim = c(x$start,max(x$times)),
ylim=c(0,1),
lab=c(10,10,7),
txt=eval(substitute(expression(paste(hat(P)[{a}][{b}],
"(",italic(s), ",", italic(t), ")")),
list(a=from[1],b=to[1],s=x$start))),
x.txt=(xlim[2]+xlim[1])/2,
y.txt=ylim[2]*0.9,
col=1, ...)
x |
an object of the class 'aj' |
from |
a character vector naming the states 'from' |
to |
a character vector naming the states 'to' |
xlab |
a title for the x axis |
ylab |
a title for the y axis |
xlim |
the x limits (min,max) of the plot |
ylim |
the y limits (min,max) of the plot |
lab |
A numerical vector of the form 'c(x, y, len)' which modifies the way that axes are annotated. The values of 'x' and 'y' give the (approximate) number of tickmarks on the x and y axes and 'len' specifies the label size. |
txt |
one or more character strings or expressions specifying a text to be written. |
x.txt |
the x co-ordinates to be used to position the text |
y.txt |
the y co-ordinate to be used to position the text |
col |
the color of the line(s) |
... |
other graphical arguments |
A matrix with ncol = 1 + length(from):
column 1: |
vector of the timepoints, the x-cooridinates |
column 2 to column ncol: |
vector of the estimated transition probabilities, the y-coordinates |
Matthias Wangler mw@imbi.uni-freiburg.de
data(los.data)
my.observ <- prepare.los.data(x=los.data)
my.model <- msmodel(c("0","1","2","3"),cens.name="cens")
my.trans <- trans(model=my.model,observ=my.observ)
my.aj <- aj(my.trans, s=0, t=80)
plot(my.aj,c("0","0","0","0"),c("0","1","2","3"))