The main idea is to use multivariable time series (as observations) to predict a state variable (one dimension).
Please find the attachments.
For example time series mm (4 variables and 200 observations) was used to learn V, W of a DLM. I have two question in this regard:
1) I supposed that dimensions of DLM should be as follows based on matrix operation:
FF = R4×1
GG = R1×1
V = R4×1 (because the dimension of FF×Ө and V should be the same)
W = R1×1
M0 = R1×1
C0 = R1×1
Therefore, the ¨V vector.R¨ code was developed. But, an error was displayed:
Error in dlm(FF = matrix(1, N, 1), GG = 1, V = matrix(exp(parm [1:4]), : Incompatible dimensions of matrices
Debug result:
m