From 10bf8f6e5b046bae3efe3ad990df8290ebce6127 Mon Sep 17 00:00:00 2001 From: helske Date: Sun, 5 Sep 2021 11:58:24 +0300 Subject: [PATCH] remove p==1 warning --- R/models.R | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/R/models.R b/R/models.R index d1359483..ac0ce007 100644 --- a/R/models.R +++ b/R/models.R @@ -422,12 +422,7 @@ ssm_mlg <- function(y, Z, H, T, R, a1 = NULL, P1 = NULL, y <- check_y(y, multivariate = TRUE) n <- nrow(y) p <- ncol(y) - if (p == 1) { - warning(paste( - "Found univariate series as input but defining multivariate model.", - "It can be more efficient to use 'ssm_ulg' instead of 'ssm_mlg'.", - sep = " ")) - } + # create Z Z <- check_Z(Z, p, n, multivariate = TRUE) m <- dim(Z)[2] @@ -562,12 +557,7 @@ ssm_mng <- function(y, Z, T, R, a1 = NULL, P1 = NULL, distribution, y <- check_y(y, multivariate = TRUE) n <- nrow(y) p <- ncol(y) - if (p == 1) { - warning(paste( - "Found univariate series as input but defining multivariate model.", - "It can be more efficient to use 'ssm_ung' instead of 'ssm_mng'.", - sep = " ")) - } + if(length(distribution) == 1) distribution <- rep(distribution, p) check_distribution(y, distribution) if(length(phi) == 1) phi <- rep(phi, p)