dynr.model: Create a dynrModel object for parameter estimation (cooking...

Description Usage Arguments Details Examples

Description

Create a dynrModel object for parameter estimation (cooking dynr) using dynr.cook

Usage

1
dynr.model(dynamics, measurement, noise, initial, data, ..., outfile)

Arguments

dynamics

a dynrDynamics object prepared with prep.formulaDynamics or prep.matrixDynamics

measurement

a dynrMeasurement object prepared with prep.loadings or prep.measurement

noise

a dynrNoise object prepared with prep.noise

initial

a dynrInitial object prepared with prep.initial

data

a dynrData object made with dynr.data

...

additional arguments specifying other dynrRecipe objects. Argument regimes is for a dynrRegimes object prepared with prep.regimes and argument transform is for a dynrTrans object prepared with prep.tfun.

outfile

a character string of the name of the output C script of model functions to be compiled for parameter estimation.

Details

A dynrModel is a collection of recipes. The recipes are constructed with the functions prep.measurement, prep.noise, prep.formulaDynamics, prep.matrixDynamics, prep.initial, and in the case of regime-switching models prep.regimes. Additionally, data must be prepared with dynr.data and added to the model.

There are several available methods for dynrModel objects.

  • The dollar sign ($) can be used to both get objects out of a model and to set pieces of the model.

  • names returns the names of the free parameters in a model.

  • printex prints LaTeX expressions for the equations that compose a model. The output can then be readily typeset for inclusion in presentations and papers.

Examples

1
2
3
4
#rsmod <- dynr.model(dynamics=recDyn, measurement=recMeas, noise=recNoise, 
#    initial=recIni, regimes=recReg, data=dd, outfile="RSLinearDiscrete.c")
#For a full demo example, see:
#demo(RSLinearDiscrete , package="dynr")


Search within the dynr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.