SS.sim.tv {SSsimple} | R Documentation |
Simulation
Description
Simulate a time-varying state space system
Usage
SS.sim.tv(F, H, Q, R, length.out, beta0=0)
Arguments
F |
A list of d x d matrices. |
H |
A list of n x d matrices. |
Q |
A list of d x d matrices. |
R |
A list of n x n matrices. |
length.out |
A scalar integer. |
beta0 |
Initial state value. A scalar, or a vector of length d. |
Details
This function is a more general, and slower, implementation of SS.sim
. This function can also accept arguments in non-time-varying fashion (a la SS.sim
).
Value
A named list.
Beta |
A T x d matrix, the ith row of which is the state at time i. |
Y |
A T x n matrix, the ith row of which is noiseless observation at time i. |
Z |
A T x n matrix, the ith row of which is observation at time i. |
Examples
set.seed(9999)
H.tv <- list()
for(i in 1:200) {
H.tv[[i]] <- matrix( c( sin(i * 0.05), cos(i * 0.05) ), 1, 2 )
}
ssx <- SS.sim.tv( 0.99, H.tv, 0.001, 1, 200, c(4,4) )
plot(ssx$Z[ ,1], type="l")
[Package SSsimple version 0.6.6 Index]