ctsem (version 3.0.4)

ctStanPlotPost: ctStanPlotPost

Description

Plots prior and posterior distributions of model parameters in a ctStanModel or ctStanFit object.

Usage

ctStanPlotPost(obj, rows = "all", priorwidth = TRUE, mfrow = "auto",
  lwd = 2, smoothness = 1, parcontrol = list(mgp = c(1.3, 0.5, 0),
  mar = c(3, 2, 2, 1) + 0.2), wait = FALSE)

Arguments

obj

fit or model object as generated by ctStanFit, ctModel, or ctStanModel.

rows

vector of integers denoting which rows of obj$setup$popsetup to plot priors for. Character string 'all' plots all rows with parameters to be estimated.

priorwidth

if TRUE, plots will be scaled to show bulk of both the prior and posterior distributions. If FALSE, scale is based only on the posterior.

mfrow

2 dimensional integer vector defining number of rows and columns of plots, as per the mfrow argument to par. 'auto' determines automatically, to a maximum of 4 by 4, while NULL uses the current system setting.

lwd

line width for plotting.

smoothness

Positive numeric -- multiplier to modify smoothness of density plots, higher is smoother but can cause plots to exceed natural boundaries, such as standard deviations below zero.

parcontrol

parameters to pass to par which temporarily change plot settings.

wait

If true, user is prompted to continue before plotting next graph. If false, graphs are plotted one after another without waiting.

Examples

Run this code
# NOT RUN {
ctStanPlotPost(ctstantestfit, rows=3:4)
# }

Run the code above in your browser using DataCamp Workspace