kalman: Function for applying a Kalman filter to the drift dives

View source: R/Kalman.R

kalmanR Documentation

Function for applying a Kalman filter to the drift dives

Description

Function for running a kalman filter to a subset of potential drift dives.

Usage

kalman(
  Data,
  update = 4e+05,
  n.iter = 10000,
  n.chains = 3,
  n.adapt = 1000,
  parallel = FALSE
)

Arguments

Data

An object of class 'data.frame' that needs to include at least date and drift rate

update

Burn.in length.

n.iter

posterior drawn length.

n.chains

number of chains to be drawn.

n.adapt

adaption length (for jags performance)

parallel

logical. if TRUE, it will run 3 chains in three different cores of the local machine.

Details

This functions is a wrap to a kalman filter implemented in jags (Just another Gibs sampler). It is a bit slow as it requires require long chains. Current set up is a burn in of 400.000 iterations. The chains can be run in parallel. If parallel is set to TRUE, it will run three chains, each one in a different core

Value

an object of class 'list' that includes: 1) the original dataset (plus some remaping of variables), the model (a jags object), the output etc...


farcego/slimmingDive documentation built on April 14, 2024, 8:24 a.m.