Learn R Programming

FVDDPpkg (version 0.1.2)

approx.smooth: Approximate the smoothing distribution of a Fleming-Viot latent signal

Description

Approximate the smoothing distribution of a Fleming-Viot latent signal

Usage

approx.smooth(fvddp.past, fvddp.future, t.past, t.future, y.new, N)

Value

An object of class fvddp, with the same hyperparmeters as fvddp.past

and fvddp.future. Since this function is a Monte-Carlo based approximation of smooth(), the outputs are similar.

Arguments

fvddp.past

An instance of class fvddp, progressively updated ad propagated with data referring to past times via update() and propagate() (or its approximate version, approx.propagate()).

fvddp.future

Same as fvddp.past, but in this case the propagation has been performed with time data from times later than the one to be estimated. Its hyperparameters must be equals to the ones of fvddp.past.

t.past

The time between the last collection of data (in the past) and the time at which the smoothing is performed.

t.future

Same as t.past, but in this case it is referred to the future. t.future is positive too.

y.new

The data collected at the time the smoothing is performed.

N

the amount of samples to be drawn in order to perform the approximation.

See Also

smooth() for a (slower) exact computation

Examples

Run this code
FVDDP = initialize(3, function(x) rbinom(x, 10, .2),
                   function(x) dbinom(x, 10, .2), TRUE)
FVDDP.PAST = update(FVDDP, c(2,3))
FVDDP.FUTURE = update(FVDDP, c(4))
FVDDP.FUTURE = propagate(FVDDP.FUTURE, 0.5)
FVDDP.FUTURE = update(FVDDP.FUTURE, c(1))
approx.smooth(fvddp.past = FVDDP.PAST, fvddp.future = FVDDP.FUTURE,
              t.past = 0.4, t.future = 0.3, y.new = c(1,3), N = 20000)

Run the code above in your browser using DataLab