Type: | Package |
Title: | Data Assimilation |
Version: | 1.0 |
Date: | 2017-11-02 |
Author: | Svetlana Saarela and Anton Grafström |
Maintainer: | Svetlana Saarela <admin@svetlanasaarela.com> |
Description: | For estimation of a variable of interest using Kalman filter by incorporating results from previous assessments, i.e. through development weighted estimates where weights are assigned inversely proportional to the variance of existing and new estimates. For reference see Ehlers et al. (2017) <doi:10.20944/preprints201710.0098.v1>. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
LazyData: | TRUE |
Imports: | Rcpp (≥ 0.12.4) |
Depends: | R (≥ 3.1) |
LinkingTo: | Rcpp, RcppArmadillo |
Encoding: | UTF-8 |
Packaged: | 2017-11-02 13:27:45 UTC; Svetlana |
NeedsCompilation: | yes |
Repository: | CRAN |
Date/Publication: | 2017-11-02 15:26:43 UTC |
Data Assimilation
Description
This function estimates a variable of interest through Data Assimilation technique by incorporating results from previous assessments.
Usage
datassim(X, Var, Corr)
Arguments
X |
Matrix of predictions, with |
Var |
Matrix of corresponding prediction variances, same dimension as |
Corr |
Matrix or value of correlations between observations from different time points, by default |
Value
$weights |
Estimated Kalman gain according to Eq.[7] in Ehlers et al. (2017). |
$PreDA |
Predicted values through Data Assimilation according to Eq.[5] in Ehlers et al. (2017). |
$VarDA |
Corresponding estimated variances according to Eq.[6] in Ehlers et al. (2017). |
$Correlation |
Correlation matrix. |
References
Ehlers, S., Saarela, S., Lindgren, N., Lindberg, E., Nyström, M., Grafström, A., Persson, H., Olsson, H. & Ståhl, G. (2017). Assessing error correlations in remote sensing-based predictions of forest attributes for improved data assimilation. DOI
Examples
Pred1 = rnorm(10, mean = 50, sd = 100);
Pred2 = rnorm(10, mean = 50, sd = 30);
Pred3 = rnorm(10, mean = 50, sd = 80);
Pred4 = rnorm(10, mean = 50, sd = 100);
# Predictions based on ten observations, at four different time points
Prediction = cbind(Pred1, Pred2, Pred3, Pred4);
Var1 = matrix(10000, 10);
Var2 = matrix(900, 10);
Var3 = matrix(1600, 10);
Var4 = matrix(10000, 10);
# Corresponding prediction variances
Variance = cbind(Var1, Var2, Var3, Var4);
# Corr = 0 by default
datassim(X = Prediction, Var = Variance);
# Corr = 0.5
datassim(Prediction, Variance, 0.5);
Corr = cor(Prediction);
datassim(Prediction, Variance, Corr);