Wiki

Clone wiki

Biostatistics Rockefeller University / Kalman Filter Normalization

Kalman Filter Normalization

Introduction

In many experiments in Biology there is a need to adjust the outcome in order to eliminate potential sources of bias that come from confounders. A particular situation emerges when both the outcome and the confounder are subject to exogenous variables like the temperature, humidity or air pressure. This situation gets even more complicated when outcome, confounders and exogenous variables are all measured over time.

Methodology

The methodology proposed here to normalize the outcome in order to eliminate the undesirable effect of other time series is to adjust a DLM (Dynamic Linear Model) in a way that the parameters may be estimated via the Kalman Filter.

Computational Resources

Normalization via Kalman Filter can be done with the package KFAS present in R software. Here we present a example of how an outcome can be normalized as function of weather Time Series data.

#!R

library(KFAS)

# specify a dynamic linear regression 

# estimate the hyperparameters of the dynamic linear regression

# use the estimated hyperparameters to obtain filtered, smoothed and predictions for the states and outcomes

Updated