fit_brms_binomial: Fit a brms model with count data

View source: R/fit_brms.R

fit_brms_binomialR Documentation

Fit a brms model with count data

Description

Fit a brms model with count data

Usage

fit_brms_binomial(
  .formula,
  .data,
  verbose = TRUE,
  .prior = c(prior_string("normal(0, 1)", class = "b"), prior_string("normal(0, 1)",
    class = "sd"), prior_string("normal(0, 1)", class = "Intercept")),
  .iter = 2000,
  .warmup = floor(.iter/2),
  .cores = 4,
  .chains = 4,
  .threads = NULL,
  .backend = "cmdstanr",
  .seed = 2138
)

Arguments

.formula

model specification

.data

collapsed survey dataset, built from ccesMRPprep::build_counts

verbose

Whether to show iteration messages

.prior

prior specification that can be interpreted by brms. The default is a standard normal prior, which is tighter than the brms default but has shown to have good prior posterior draws

.iter

Number of total iterations.

.warmup

Of the iterations, how much are burn-ins. Defaults to half.

.cores

Number of cores to uses

.chains

Number of chains to pass on fit_brms

.threads

The number of threads to do within-chain parallelization. Defaults to not using, which is NULL

.backend

The backend argument of brms. Currently only "cmdstanr"

.seed

seed for randomization to pass into brm


kuriwaki/ccesMRPrun documentation built on Sept. 24, 2024, 2:15 a.m.