fit_progression_rate_model: Fit a progression rate model to case-carrier data

View source: R/functions.R

fit_progression_rate_modelR Documentation

Fit a progression rate model to case-carrier data

Description

Fit a progression rate model to case-carrier data

Usage

fit_progression_rate_model(
  input_data,
  type_specific = TRUE,
  location_adjustment = TRUE,
  stat_model = "poisson",
  strain_as_primary_type = FALSE,
  strain_as_secondary_type = FALSE,
  model_description = NULL,
  num_chains = 4,
  num_iter = 10000,
  num_cores = 1,
  adapt_delta_value = 0.8,
  stepsize_value = 1,
  max_treedepth_value = 10
)

Arguments

input_data

List of lists generated by 'process_input_data'

type_specific

Boolean specifying whether progression rates vary between types

location_adjustment

Boolean specifying whether progression rates vary between locations

stat_model

Whether progression to disease is "poisson" (Poisson process) or "negbin" (overdispersed negative binomial distribution)

strain_as_primary_type

Whether strain should be used as the primary determinant of progression rate, and the other type used as the secondary determinant

strain_as_secondary_type

Whether strain should be used as the secondary determinant of progression rate, and the other type used as the primary determinant

model_description

Descriptive title of model

num_chains

Number of MCMCs to be run for inference

num_iter

Length of MCMCs

num_cores

Number of threads used to calculate MCMCs

adapt_delta_value

Target average acceptance probability of MCMCs (default = 0.8)

stepsize_value

Initial MCMC step size (default = 1)

max_treedepth_value

Depth of tree explored by MCMC sampler (default = 10)

Value

A stanfit object


nickjcroucher/progressionEstimation documentation built on April 15, 2023, 3:53 p.m.