get_jags_data: Adds helper variables for use in 'run_jags'

Description Usage Arguments

View source: R/run_jags.R

Description

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

Usage

1
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" (default): 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 Aug. 3, 2020, 5:07 p.m.