Learn R Programming

ctsem (version 3.0.9)

ctStanPlotPost: ctStanPlotPost

Description

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

Usage

ctStanPlotPost(
  obj,
  rows = "all",
  npp = 6,
  priorwidth = TRUE,
  smoothness = 1,
  plot = TRUE,
  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.

npp

Integer number of parameters to show per page.

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.

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.

plot

Logical, if FALSE, ggplot objects are returned in a list instead of plotting.

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 DataLab