indexsort {pttstability}R Documentation

Sort output of particle filter

Description

Sorts outputs of particle filter based on index - returns a sorted list of particles, based on the sampling trajectory through time. This is a somewhat more accurate estiamte of the true posterior than are the stepwise samples provided by the filter.

Usage

indexsort(fulltracemat, fulltraceindex, nsmp = NULL)

Arguments

fulltracemat

full output of particles from the particleFilterLL function

fulltraceindex

full output of particle indices from the particleFilterLL function

nsmp

number of particle paths to sample - defaults to NULL, which samples all paths

Value

an index-sorted matrix - each column shows the trajectory of a single particle


[Package pttstability version 1.4 Index]