plot.ordinal {ordinal} | R Documentation |
Plots the variables in data object of type ordinal
with class
repeated
or response
. If the data object contains
time-constant covaiate(s) (tccov
), a plot can be obtained for
each level of one discrete covariate.
plot.ordinal(z,ccov=NULL,main=NULL,xlab=NULL,ylab=NULL,xlim=NULL, ylim=NULL,lty=NULL,add=F,axes=F,bty="n",at=NULL, touch=F,...)
z |
A data object of class repeated or response ,
and of type ordinal . |
ccov |
The name of a discrete time-constant covariate present in
the data object of type ordinal . |
main |
A main title for the plot. |
xlab |
A label for the x-axis. |
ylab |
A label for the y-axis. |
xlim |
The x limits (min,max) of the plot. |
ylim |
The y limits (min,max) of the plot. |
lty |
A vector of integers or character strings specifying the
line type to be used as the default in plotting lines. For further
information, see par . |
pch |
A vector of integers or single characters specifying
symbols to be used as the default in plotting points. For further
information, see par . |
add |
If TRUE, the graph is added to an existing plot. |
axes |
If FALSE, axes are not drawn around the plot. |
bty |
A character string which determined the type of box which
is drawn about plots. For further information, see
par . |
at |
The points at which tick-marks are to be drawn. For further
information, see axis . |
touch |
If TRUE, the x-axis and y-axis will touch each other. |
P.J. Lindsey
lvna
, plot.response
,
plot.repeated
, restovec
,
rmna
, tcctomat
, tvctomat
.
library(ordinal) # # Binary data # data(cardiac.indiv) y <- restovec(cardiac.indiv[,1:4],type="ordinal") cov <- tcctomat(as.matrix(cardiac.indiv[,5:10])) w <- rmna(y,ccov=cov) rm(cardiac.indiv,y,cov) par(mfrow=c(2,3)) plot(w,main="All data.") plot(w,ccov="sex",add=T) plot(w,ccov="pmi",add=T) par(mfrow=c(1,1)) rm(w) # # Ordinal data # data(tmi2) y <- restovec(tmi2[,1:4],type="ordinal") cov <- tcctomat(tmi2[,5],name="distance") w <- rmna(y,ccov=cov) rm(tmi2,y,cov) par(mfrow=c(2,2)) plot(w,main="All data.") plot.new() plot(w,ccov="distance",add=T) par(mfrow=c(1,1)) rm(w)