Skip to contents

Initialize CAR model

Usage

initialize_model(
  name,
  dir = tempdir(),
  data,
  adjacency,
  inits = NULL,
  priors = NULL,
  model = c("mstcar", "ucar", "mcar"),
  method = c("binom", "pois"),
  m0 = 3,
  A = NULL,
  rho_up = FALSE,
  impute_lb = 1,
  impute_ub = 9,
  seed = 1234,
  .ignore_checks = FALSE
)

Arguments

name

Name of model and corresponding folder

dir

Directory where model will live

data

Dataset including mortality (Y) and population (n) information

adjacency

Dataset including adjacency information

inits

Optional list of initial conditions for each parameter

priors

Optional list of priors for updates

model

Run model as an MSTCAR/UCAR/MCAR model

method

Run model with either Binomial data or Poisson data

m0

Baseline neighbor count by region

A

Describes intensity of smoothing between regions

rho_up

Controls whether rho update is performed for MSTCAR models

impute_lb

If counts between lb and ub are suppressed for privacy reasons, impute_lb is lower bound

impute_ub

If counts between lb and ub are suppressed for privacy reasons, impute_ub is upper bound

seed

Set of random seeds to use for data replication

.ignore_checks

If set to TRUE, ignores data checks. Only use if you are certain that your input data is correct and you are encountering bugs during setup