buildModelFuncs {pfr}R Documentation

Build c++ particle filtering code for your R session.

Description

Build c++ particle filtering code for your R session.

Usage

buildModelFuncs(myDir, modelName, verbose = FALSE)

Arguments

myDir

directory with your three code files (i.e. model header, model source and export code)

modelName

your model name. Must be in all lowercase, and be a substring of the above-mentioned filenames

verbose

logical and passed in to inline::cxxfunction()

Value

an Rcpp Module object

Examples

## Not run: 
# compile everything from scratch
svol_lev <- buildModelFuncs("~/Desktop", "svol_leverage")

# then use your model's log-likelihood and filtering functions
svol_lev$svol_leverage_bswc_approx_LL(rnorm(100), c(.9, 0.0, 1.0, -.2))
svol_lev$svol_leverage_bswc_approx_filt(rnorm(100), c(.9, 0.0, 1.0, -.2))

## End(Not run)

[Package pfr version 1.0.1 Index]