ctsem (version 3.0.4)

ctStanKalman: Get Kalman filter estimates from a ctStanFit object

Description

Get Kalman filter estimates from a ctStanFit object

Usage

ctStanKalman(fit, nsamples = NA, collapsefunc = NA, cores = 2, ...)

Arguments

fit

fit object from ctStanFit.

nsamples

either NA (to extract all) or a positive integer from 1 to maximum samples in the fit.

collapsefunc

function to apply over samples, such as mean

cores

Integer number of cpu cores to use. Only needed if savescores was set to FALSE when fitting.

...

additional arguments to collpsefunc.

Value

list containing Kalman filter elements, each element in array of iterations, data row, variables. llrow is the log likelihood for each row of data.

Examples

Run this code
# NOT RUN {
k=ctStanKalman(ctstantestfit)
# }

Run the code above in your browser using DataCamp Workspace