From 1043065c18cdae5ea5be9386879ebe346bdebf8f Mon Sep 17 00:00:00 2001 From: "jouni.helske@jyu.fi" Date: Tue, 27 May 2014 16:14:59 +0300 Subject: [PATCH] Version 1.0.4 uploaded to CRAN, --- .gitignore | 1 + DESCRIPTION | 4 ++-- R/SSMcustom.R | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f932570..58c5522 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ src/*.o src/*.so src/*.dll .project +.settings/org.eclipse.core.resources.prefs diff --git a/DESCRIPTION b/DESCRIPTION index a2ba4ca..c2ba0bc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,13 +1,13 @@ Package: KFAS Version: 1.0.4 -Date: 2014-04-23 +Date: 2014-05-27 Title: Kalman Filter and Smoother for Exponential Family State Space Models. Author: Jouni Helske Maintainer: Jouni Helske Depends: R (>= 3.0.0) Imports: stats -Suggests: MASS, nloptr, testthat +Suggests: MASS, testthat Description: Package KFAS provides functions for Kalman filtering, smoothing, forecasting and simulation of multivariate exponential family state space models with exact diffuse initialization when distributions of some or all diff --git a/R/SSMcustom.R b/R/SSMcustom.R index c3f51c3..0ca7420 100644 --- a/R/SSMcustom.R +++ b/R/SSMcustom.R @@ -73,7 +73,8 @@ SSMcustom <- function(Z, T, R, Q, a1, P1, P1inf, index, n) { stop("Misspecified P1inf, argument P1inf must be a (m x m) matrix, where m is the number of states..") } } - + diag(P1inf)[diag(P1) > 0 || is.na(diag(P1))] <- 0 + a1[diag(P1inf) > 0] <- 0 state_names <- paste0("custom", 1:m) list(index = index, m = m, k = k, p = p, n = n, Z = Z, T = T, R = R, Q = Q, a1 = a1, P1 = P1, P1inf = P1inf, tvz = dim(Z)[3] >