define_fit_priors: Prior distributions for fitted model parameters.

View source: R/fit.R

define_fit_priorsR Documentation

Prior distributions for fitted model parameters.

Description

Create a dataframe with the definition of the prior distribution for all parameters that will be fitted to data. The definition are written in a CSV file.

Usage

define_fit_priors(path)

Arguments

path

String. Path to the CSV file. The CSV file must have a specific format:

  • column name: the variable name must match the name of the model parameters that will be fitted. For example, the basic reproduction number is R0 (and not, say, Rzero).

  • column distrib: the name of the distribution type for the prior variable. Use the standard nomenclature for probability distribution in R (e.g., rnorm(), rexp(), ...)

  • column prms: the parameters for the distribution type for the prior variable. Use the standard nomenclature for probability distribution in R (e.g., mean and sd for rnorm(), etc.) separated by a semi-colon ;.

Value

Dataframe with three columns: name, distrib,prms.

Examples

## Not run: 
An example for the CSV file is:

name,        distrib, prms
R0,          rnorm,   3.0; 0.2
transm.v_3,  rexp,    0.10 

which translates into:
 - The parameter R0 has a normal distribution 
   with mean 3.0 and std dev 0.2 as a prior distribution. 
 - The 3rd element of the vector that represents 
   the time-dependent transmission rate `transm.v` 
   (beta in the mathematical documentation) has an 
   exponential prior distribution with mean 1/0.10.

## End(Not run)



phac-nml-phrsd/wem documentation built on June 6, 2024, 11:06 p.m.