plot.ipriorMod {iprior}R Documentation

Plots for I-prior models

Description

There are three types of plots that are currently written in the package:

plot_fitted

Plot the fitted regression line with credibility bands.

plot_predict

Plot residuals against fitted values.

plot_iter

Plot the progression of the log-likelihood value over time.

The S3 method plot for class ipriorMod currently returns plot_fitted.

Usage

## S3 method for class 'ipriorMod'
plot(x, ...)

plot_resid(x)

plot_fitted_multilevel(
  x,
  X.var = 1,
  grp.var = 1,
  facet = c(2, 3),
  cred.bands = TRUE,
  show.legend = TRUE,
  show.points = TRUE,
  x.lab = NULL,
  y.lab = NULL,
  grp.lab = NULL,
  extrapolate = FALSE
)

plot_fitted(x, X.var = 1, cred.bands = TRUE, size = 1, linetype = "solid")

plot_iter(x, niter.plot = NULL, lab.pos = c("up", "down"))

plot_ppc(x, draws = 100)

Arguments

x

An ipriorMod object.

...

Not used

X.var

The index of the X variable to plot.

grp.var

Index of the grouping variable for multilevel plots.

facet

The index of the X variable in which to facet. This is a vector of maximum length 2.

cred.bands

Logical. Plot the confidence intervals? Defaults to TRUE.

show.legend

Logical. Show legend?

show.points

Logical. Show data points?

x.lab

(Optional) X axis label.

y.lab

(Optional) Y axis label.

grp.lab

(Optional) The name for the groups, which is also the legend title.

extrapolate

Logical. Extend the fitted regression line to fill the plot?

size

Size of the fitted line

linetype

Type of the fitted line

niter.plot

(Optional) Vector of length at most two, indicating the start and end points of the iterations to plot.

lab.pos

Adjust the position of the log-likelihood label.

draws

Number of draws for posterior predictive check.

grp

The index of the groups.

Details

See ggplot2 documentation for the plotting parameters.


[Package iprior version 0.7.4 Index]