ctStanPlotPost: ctStanPlotPost

View source: R/ctStanPlotPost.R

ctStanPlotPostR Documentation

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,
  priorsamples = 10000,
  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.

priorsamples

number of samples from prior to use. More is slower.

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.

...

Parameters to pass to ctStanFit. cores = x will speed things up, where x is the number of cpu cores to use.

Examples


ctStanPlotPost(ctstantestfit, rows=3:4)


ctsem documentation built on Sept. 11, 2024, 9:06 p.m.