I am trying to program a simple Kalman Filter and Smoother that incorporates the possibility of partially missing observations in the observables vector. However, this would require to store arrays of varying dimensions. The innovations vector and the innovations covariance matrix are of time varying dimensions depending on which observations are available. What would be an efficient way to deal with this?
The third dimension of the arrays (one for the innovations and one for the covariance of the innovations) should be time, while the other two will depend on the specific situation.