Interface to bayesplot's mcmc_pairs function for use with rstap models. Be careful not to specify too many parameters to include or the plot will be both hard to read and slow to render.

# S3 method for stapreg
pairs(x, pars = NULL, regex_pars = NULL,
  condition = pairs_condition(nuts = "accept_stat__"), ...)



A fitted model object returned by one of the rstap modeling functions. See stapreg-objects.


An optional character vetor of parameter names. All parameters are included by default, but for models with more than just a few parameters it may be far too many to visualize on a small computer screen and also may require substantial computing time.


An optional character vector of regular expressions to use for parameter selection. regex_pars can be used in place of pars or in addition to pars. Currently, all functions that accept a regex_pars argument ignore it for models fit using optimization.


Same as the condition argument to mcmc_pairs except the default is different for rstap models. By default, the mcmc_pairs function in the bayesplot package plots some of the Markov chains (half, in the case of an even number of chains) in the panels above the diagonal and the other half in the panels below the diagonal. However since we know that rstap models were fit using Stan (which bayesplot doesn't assume) we can make the default more useful by splitting the draws according to the accept_stat__ diagnostic. The plots below the diagonal will contain realizations that are below the median accept_stat__ and the plots above the diagonal will contain realizations that are above the median accept_stat__. To change this behavior see the documentation of the condition argument at mcmc_pairs.


Optional arguments passed to mcmc_pairs. The np, lp, and max_treedepth arguments to mcmc_pairs are handled automatically by rstap and do not need to be specified by the user in .... The arguments that can be specified in ... include transformations, diag_fun, off_diag_fun, diag_args, off_diag_args, and np_style. These arguments are documented thoroughly on the help page for mcmc_pairs.