Density and scatter plots
# S3 method for sim
plot(
x,
estimate,
se = NULL,
true = NULL,
names = NULL,
auto.layout = TRUE,
byrow = FALSE,
type = "p",
ask = grDevices::dev.interactive(),
col = c("gray60", "orange", "darkblue", "seagreen", "darkred"),
pch = 16,
cex = 0.5,
lty = 1,
lwd = 0.3,
legend,
legendpos = "topleft",
cex.legend = 0.8,
plot.type = c("multiple", "single"),
polygon = TRUE,
density = 0,
angle = -45,
cex.axis = 0.8,
alpha = 0.2,
main,
cex.main = 1,
equal = FALSE,
delta = 1.15,
ylim = NULL,
xlim = NULL,
ylab = "",
xlab = "",
rug = FALSE,
rug.alpha = 0.5,
line.col = scatter.col,
line.lwd = 1,
line.lty = 1,
line.alpha = 1,
scatter.ylab = "Estimate",
scatter.ylim = NULL,
scatter.xlim = NULL,
scatter.alpha = 0.5,
scatter.col = col,
border = col,
true.lty = 2,
true.col = "gray70",
true.lwd = 1.2,
density.plot = TRUE,
scatter.plot = FALSE,
running.mean = scatter.plot,
...
)
sim object
columns with estimates
columns with standard error estimates
(optional) vector of true parameter values
(optional) names of estimates
Auto layout (default TRUE)
Add new plots to layout by row
plot type
if TRUE user is asked for input, before a new figure is drawn
colour (for each estimate)
plot symbol
point size
line type
line width
legend
legend position
size of legend text
'single' or 'multiple' (default)
if TRUE fill the density estimates with colour
if non-zero add shading lines to polygon
shading lines angle of polygon
Font size on axis
Semi-transparent level (1: non-transparent, 0: full)
Main title
Size of title font
Same x-axis and y-axis for all plots
Controls the amount of space around axis limits
y-axis limits
x-axis limits
y axis label
x axis label
if TRUE add rug representation of data to x-axis
rug semi-transparency level
line colour (running mean, only for scatter plots)
line width (running mean, only for scatter plots)
line type (running mean, only for scatter plots)
line transparency
y label for density plots
y-axis limits for density plots
x-axis limits for density plots
semi-transparency of scatter plot
scatter plot colour
border colour of density estimates
true parameter estimate line type
true parameter colour
true parameter line width
if TRUE add density plot
if TRUE add scatter plot
if TRUE add running average estimate to scatter plot
additional arguments to lower level functions
n <- 1000
val <- cbind(est1=rnorm(n,sd=1),est2=rnorm(n,sd=0.2),est3=rnorm(n,1,sd=0.5),
sd1=runif(n,0.8,1.2),sd2=runif(n,0.1,0.3),sd3=runif(n,0.25,0.75))
plot.sim(val,estimate=c(1,2),true=c(0,0),se=c(4,5),equal=TRUE,scatter.plot=TRUE)
plot.sim(val,estimate=c(1,3),true=c(0,1),se=c(4,6),xlim=c(-3,3),
scatter.ylim=c(-3,3),scatter.plot=TRUE)
plot.sim(val,estimate=c(1,2),true=c(0,0),se=c(4,5),equal=TRUE,
plot.type="single",scatter.plot=TRUE)
plot.sim(val,estimate=c(1),se=c(4,5,6),plot.type="single",scatter.plot=TRUE)
plot.sim(val,estimate=c(1,2,3),equal=TRUE,scatter.plot=TRUE)
plot.sim(val,estimate=c(1,2,3),equal=TRUE,byrow=TRUE,scatter.plot=TRUE)
plot.sim(val,estimate=c(1,2,3),plot.type="single",scatter.plot=TRUE)
plot.sim(val,estimate=1,se=c(3,4,5),plot.type="single",scatter.plot=TRUE)
density.sim(val,estimate=c(1,2,3),density=c(0,10,10), lwd=2, angle=c(0,45,-45),cex.legend=1.3)