Get Kalman filter estimates from a ctStanFit object
ctStanKalman(
fit,
nsamples = NA,
pointest = TRUE,
collapsefunc = NA,
cores = 1,
standardisederrors = FALSE,
subjectpars = TRUE,
tformsubjectpars = TRUE,
indvarstates = FALSE,
...
)
list containing Kalman filter elements, each element in array of iterations, data row, variables. llrow is the log likelihood for each row of data.
fit object from ctStanFit
.
either NA (to extract all) or a positive integer from 1 to maximum samples in the fit.
If TRUE, uses the posterior mode as the single sample.
function to apply over samples, such as mean
Integer number of cpu cores to use. Only needed if savescores was set to FALSE when fitting.
If TRUE, computes standardised errors for prior, upd, smooth conditions.
if TRUE, state estimates are not returned, instead, predictions of each subjects parameters are returned, for parameters that had random effects specified.
if FALSE, subject level parameters are returned in raw, pre transformation form.
if TRUE, do not remove indvarying states from output
additional arguments to collpsefunc.
k=ctStanKalman(ctstantestfit,subjectpars=TRUE,collapsefunc=mean)
Run the code above in your browser using DataLab