Learn R Programming

ctsem (version 2.1.0)

ctPlotArray: Plots a three dimensional array

Description

1st margin sets line values, 2nd sets variables, 3rd quantiles.

Usage

ctPlotArray(yarray, x, grid = TRUE, separate = FALSE, colvec = "auto", lwdvec = "auto", ltyvec = "auto", typevec = "auto", mainvec = "auto", plotcontrol = list(ylab = "Array values", xlab = "X values"), legend = TRUE, legendcontrol = list(x = "topright"), polygon = TRUE, polygonalpha = 0.1, polygoncontrol = list(border = NA))

Arguments

yarray
3 dimensional array to use for Y values
x
numeric vector specifying x axis
grid
Logical. Plot with a grid?
separate
Logical. Generate a plot per variable (2nd margin of array) or plot all on one?
colvec
color vector of same length as 2nd margin.
lwdvec
lwd vector of same length as 2nd margin.
ltyvec
lty vector of same length as 2nd margin.
typevec
type vector of same length as 2nd margin.
mainvec
main vector of same length as 2nd margin, only used if separate=TRUE.
plotcontrol
list of arguments to pass to plot.
legend
Logical. Draw a legend?
legendcontrol
list of arguments to pass to legend.
polygon
Logical. Draw the uncertainty polygon?
polygonalpha
Numeric, multiplier for alpha (transparency) of the uncertainty polygon.
polygoncontrol
list of arguments to pass to ctPoly

Value

Nothing. Generates plots.

Examples

Run this code
y <- ctStanTIpredeffects(ctstantestfit,plot=FALSE)
x<-ctstantestfit$data$tipreds[order(ctstantestfit$data$tipreds[,1]),1]
ctPlotArray(y,x,separate=TRUE)

Run the code above in your browser using DataLab