fitmodel | R Documentation |
A fitmodel
object is a list
that stores some variables and
functions that will be useful to simulate and fit your model during the
course.
fitmodel(
name = NULL,
stateNames = NULL,
thetaNames = NULL,
simulate = NULL,
rPointObs = NULL,
dPrior = NULL,
dPointObs = NULL
)
name |
character. Name of the model (required). |
stateNames |
character vector. Names of the state variables i.e.
|
thetaNames |
character vector. Names of the parameters i.e.
|
simulate |
R-function to simulate forward the model (required). This function takes 3 arguments:
and returns a |
rPointObs |
R-function that generates a (randomly sampled) observation
point from a model point, using an observation model (optional). It thus
acts as an inverse of
and returns an observation point |
dPrior |
R-function that evaluates the prior density of the parameters
at a given
and returns the (logged, if requested) value of the prior density distribution. |
dPointObs |
R-function that evaluates the likelihood of one data point given the state of the model at the same time point. This function takes 4 arguments:
and returns the (log-)likelihood. (optional) |
a fitmodel
object that is a list
of 7 elements:
name
character, name of the model
stateNames
vector, names of the state variables.
thetaNames
vector, names of the parameters.
simulate
R-function to simulate forward the model; usage:
simulate(theta,initState,times)
.
rPointObs
R-function to generate simulated observations;
usage: rPointObs(modelPoint, theta)
.
dPrior
R-function to evaluate the log-prior of the parameter
values; usage: dPrior(theta)
.
dPointObs
R-function to evaluate the log-likelihood of one
data point; usage: dPointObs(dataPoint, modelPoint, theta, log)
.
testFitmodel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.