FOImodel | R Documentation |
This function creates an object of the class FOImodel
. Inputs are the type of the model (required), additional parameters if required by the model, and hyperparameters for the prior distributions (optional). The models to be given as an input are predefined.
More details are given in the vignette models
.
FOImodel(
type = "constant",
K = 1,
group_size = 1,
seroreversion = 0,
se = 1,
sp = 1,
prioralpha1 = 0,
prioralpha2 = 5,
priorbeta1 = 0,
priorbeta2 = 1,
priorT1 = 1,
priorT2 = 100,
priorC1 = 0,
priorC2 = 10,
priorY1 = 0,
priorY2 = 10,
priorRho = 2,
cat_lambda = 1,
fixed_parameters = NULL,
...
)
## S3 method for class 'FOImodel'
print(x, ...)
type |
A character with the name of model. The options are:
|
K |
integer. An additional parameter used in the outbreak, constantoutbreak and piecewise stan models. In the case of the outbreaks, this parameter is the number of Gaussians used. In the case of the piecewise constant model it is the number of constant phases. Default = 1. |
group_size |
integer. An additional parameter used in the independent_group models. The force of infection is averaged over |
seroreversion |
integer, equal to 0 or 1. If |
se |
numeric, between 0 and 1. If |
sp |
numeric, between 0 and 1. If |
prioralpha1 |
First parameter of the uniform prior distribution of the parameter alpha, used as the intensity of the force of infection in the outbreak models. Default = 0. |
prioralpha2 |
Second parameter of the uniform prior distribution of the parameter alpha, used as the intensity of the force of infection in the outbreak models. Default = 5. |
priorbeta1 |
First parameter of the uniform prior distribution of the parameter beta, used as the spread of the force of infection in the outbreak models. Default = 0. |
priorbeta2 |
Second parameter of the uniform prior distribution of the parameter beta, used as the spread of the force of infection in the outbreak models. Default = 1. |
priorT1 |
First parameter for the uniform distribution for the T parameter. The time of the outbreak is defined as the number of years before the survey (outbreak and constant outbreak models). It is the time interval for the change of FOI in the piecewise constant model. Default = 1. |
priorT2 |
Second parameter for the uniform distribution for the T parameter. Default = 100. |
priorC1 |
First parameter of the uniform prior distribution for the constant force of infection, used in the constant and piecewise constant models. Default = 0. |
priorC2 |
Second parameter of the uniform prior distribution for the constant force of infection, used in the constant and piecewise constant models. Default = 10. |
priorY1 |
First parameter of the uniform prior distribution for the annual hazard of infection, used in the independent models. Default = 0. |
priorY2 |
Second parameter of the uniform prior distribution for the annual hazard of infection, used in the independent models. Default = 10. |
priorRho |
Parameter of the exponential prior distribution for rho, the seroreversion rate used when seroreversion=1. Default = 2. ##' |
cat_lambda |
integer, equal to 0 or 1. If |
... |
Additional arguments (not used). |
x |
A object of the class |
A list with the class FOImodel
, which contains the
following items:
type: The type of the model.
stanname: The name of the stan file used.
estimated_parameters: The number of estimated parameters.
priors: a list with the priors.
K: the input parameter used in the outbreak and piecewise models, if given.
Nathanael Hoze nathanael.hoze@gmail.com
## A gaussian model, with two gaussians, and user-defined priors
model <- FOImodel('outbreak',K = 2, prioralpha1 = 0, prioralpha2 = 1)
## A piecewise model, consisting in two constant phases, with seroreversion and user-defined priors
model <- FOImodel('piecewise', K=2, seroreversion=1, priorRho1=0.1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.