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

Description

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

Usage

get_jags_data(data, ST, jags_code, sample)

Arguments

data

A tibble

ST

A segment table (tibble), returned by get_segment_table.

jags_code

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

sample

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.