
Xpose visual predictive check for categorical data (binary, ordered categorical and count data).
xpose.VPC.categorical(vpc.info="vpc_results.csv",
vpctab = dir(pattern="^vpctab")[1],
object = NULL,
subset=NULL,
main="Default",
main.sub="Default",
main.sub.cex=0.85,
real.col=4,
real.lty="b",
real.cex=1,
real.lwd=1,
median.line=FALSE,
median.col="darkgrey",
median.lty=1,
ci.lines=FALSE,
ci.col="blue",
ci.lines.col="darkblue",
ci.lines.lty=3,
xlb="Default",
ylb="Proportion of Total",
force.x.continuous=FALSE,
level.to.plot=NULL,
max.plots.per.page=1,
rug=TRUE,
rug.col="orange",
censored=FALSE,
...)
Name of PSN file to use. File will come from VPC
command in PsN.
Name of vpctab file produced from PsN.
Xpose data object.
Subset of data to look at.
Title for plot.
Used for names above each plot when using multiple plots. Should be a
vector, e.g. c("title 1","title 2")
.
Size of main.sub
Color of real line.
Real line type.
Size of real line.
Width of real line.
Dray a median line?
Color of median line.
median line type.
Lines marking confidence interval?
Color of CI area.
Color of CI lines.
Type of CI lines.
X-axis label. If other than "default"" passed directly to xyplot
.
Y-axis label. Passed directly to xyplot
.
For the x variable to be continuous.
Which levels of the variable to plot. Smallest level is 1, largest is number_of_levels. For example, with 4 levels, the largest level would be 4, the smallest would be 1.
The number of plots per page.
Should there be markings on the plot showing where the intervals for the VPC are?
Color of the rug.
Is this censored data? Censored data can be both below and above the limit of quantification.
Additional information passed to function.
library(xpose4)
## move to the directory where results from PsN
## are found
cur.dir <- getwd()
setwd(paste(cur.dir,"/binary/vpc_36",sep=""))
xpose.VPC.categorical(level.to.plot=1,max.plots.per.page=4)
xpose.VPC.categorical(level.to.plot=1,max.plots.per.page=4,by="DOSE")
## ordered categorical plots
setwd(paste(cur.dir,"/ordered_cat/vpc_45",sep=""))
xpose.VPC.categorical()
## count
setwd(paste(cur.dir,"/count/vpc65b",sep=""))
xpose.VPC.categorical()
setwd(paste(cur.dir,"/count/vpc65a",sep=""))
xpose.VPC.categorical()
Run the code above in your browser using DataLab