MCMC_main: Main MCMC wrapper function

Description Usage Arguments Value See Also

View source: R/mcmc_wrapper_2.R View source: R/mcmc_wrapper_script.R

Description

This is the main wrapper function for the ferret model data MCMC fits. This will load any necessary data or parameter files and then call the next level MCMC wrapper function, MCMC_fit_1.1. Brief description: Firstly, reads in the parameter files and carries out some checks on these. eg. numeric values where needed, bounds being the right way around etc. Then formats these parameter tables correctly and matches function names with the correct functions. Also melts data to correct format. Creates a set of file names that are used for each sub-group to be fitted (ie. strain). Fairly specific to this problem, also creates an array of infection times

Usage

1
2
MCMC_main(data_file, param_file, mcmc_param_file, output_file = NULL,
  main_dir = "", group, VERBOSE = FALSE, infection_labels = NULL)

Arguments

data_file

the correct location of a .csv file containing the data to be fitted. In this case, should have four columns: group, strain, individual, titre and time

param_file

the correct location of a .csv file containing information about the parameters that describe the model of interest. See load_param_table for further details

mcmc_param_file

the correct location of a .csv file containing the parameters for the MCMC fitting. See mcmc_param_check for further details

output_file

(OPTIONAL) if specified, all standard output will be parsed to this specified file. NOT WELL TESTED, SO RECOMMEND AVOIDING

main_dir

top level directory in which to work. Defaults to the current directory

group

this is fairly specific to this data. Just specifies which group from the data file should be explored

VERBOSE

(OPTIONAL) - if true, will give printed outputs from the program

infection_labels

a vector of times and labels to represent infection events. These are used by the model plotting function, and are optional

Value

1 if an error, 0 otherwise.

See Also

MCMC_fit_1.1


jameshay218/mcmcJH documentation built on May 18, 2019, 11:20 a.m.