get_jags_data: Adds helper variables for use in 'run_jags'

View source: R/run_jags.R

get_jags_dataR Documentation

Adds helper variables for use in run_jags


Returns the relevant data columns as a list and add elements with unique varying group levels.


get_jags_data(data, ST, jags_code, sample)



A tibble


A segment table (tibble), returned by get_segment_table.


A string. JAGS model, usually returned by make_jagscode().


One of

  • "post": Sample the posterior.

  • "prior": Sample only the prior. Plots, summaries, etc. will use the prior. This is useful for prior predictive checks.

  • "both": Sample both prior and posterior. Plots, summaries, etc. will default to using the posterior. The prior only has effect when doing Savage-Dickey density ratios in hypothesis.

  • "none" or FALSE: Do not sample. Returns an mcpfit object without sample. This is useful if you only want to check prior strings (fit$prior), the JAGS model (fit$jags_code), etc.

mcp documentation built on April 1, 2023, 12:03 a.m.