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

Description Usage Arguments Details Examples

View source: R/dynrModel.R

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.

Several named arguments can be passed into the ... section of the function. These include

There are several available methods for dynrModel objects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#rsmod <- dynr.model(dynamics=recDyn, measurement=recMeas, noise=recNoise, 
#    initial=recIni, regimes=recReg, data=dd, outfile="RSLinearDiscrete.c")

#Set relative tolerance on function value via 'options':
#rsmod <- dynr.model(dynamics=recDyn, measurement=recMeas, noise=recNoise, 
#    initial=recIni, regimes=recReg, data=dd, outfile="RSLinearDiscrete.c",
#    options=list(ftol_rel=as.numeric(1e-6)))

#For a full demo example, see:
#demo(RSLinearDiscrete , package="dynr")

dynr documentation built on June 20, 2017, 9:03 a.m.

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