I have a model where the total number of variables and number of observations is quite large (around 90). Everything is fine during estimation, but if I include the option filtered_vars I get the following error:
??? Subscripted assignment dimension mismatch.
Error in ==> metropolis at 1697
stock_filter(:,:,irun_filt) = filtered_state_vector;
Error in ==> dynare_estimation at 824
metropolis(xparam1,invhess,gend,data,rawdata,bounds);
Error in ==> model1 at 776
dynare_estimation(var_list_);
Error in ==> dynare at 26
evalin('base',fname) ;
Error in ==> kaiser7 at 8
dynare model1.mod
It looks to me as if something is wrong with the size of the filtered_state_vector. Its rows should correspond to the number of variables (N=84) I presume, and its columns to the number of periods I use in estimation in my model (T=93). But somehow the function kalman_transition_matrix.m function gives me nx=109, and I get the error above... In my case, the size of the elements is:
irun_filt=1
MAX_nfilt=17
size(filtered_state_vector)= 109,93
size(stock_filter)=84,93,17
Am I doing something patently wrong? Thanks