Test the system matrices for NA and infinite values.
Also checks for large values (> 1e7) in covariance matrices H
and Q which could cause large rounding errors in filtering.
Positive semidefiniteness of these matrices is not checked. Default
is FALSE.
return.logical
If FALSE (default), an error is given if the the model is not
a valid SSModel object. Otherwise logical value is returned.
Details
Note that the validity of the values in y and Z are not tested.
These can contain NA values (but not infinite values), with condition that
when Z[i,,t] contains NA value, the corresponding y[t,i] must
also have NA value. In this case Z[i,,t] is not referenced in
filtering and smoothing, and algorithms works properly.
Value
Logical value or nothing, depending on the value of
return.logical.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(KFAS)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/KFAS/checkModel.Rd_%03d_medium.png", width=480, height=480)
> ### Name: is.SSModel
> ### Title: Test whether object is a valid 'SSModel' object
> ### Aliases: is.SSModel
>
> ### ** Examples
>
> model <- SSModel(rnorm(10) ~ 1)
> is.SSModel(model)
[1] TRUE
> model['H'] <- 1
> is.SSModel(model)
[1] TRUE
> model$H[] <- 1
> is.SSModel(model)
[1] TRUE
> model$H[,,1] <- 1
> is.SSModel(model)
[1] TRUE
> model$H <- 1
> is.SSModel(model)
[1] FALSE
>
>
>
>
>
> dev.off()
null device
1
>