fixed bugs in initialization of heteroskedastic shocks and first_obs>1 and nobs< full dimension of dataset
parent
8130125fa7
commit
8ac3f4b22b
|
@ -671,12 +671,14 @@ if options_.heteroskedastic_filter
|
||||||
|
|
||||||
for k=1:length(M_.heteroskedastic_shocks.Qvalue_orig)
|
for k=1:length(M_.heteroskedastic_shocks.Qvalue_orig)
|
||||||
v = M_.heteroskedastic_shocks.Qvalue_orig(k);
|
v = M_.heteroskedastic_shocks.Qvalue_orig(k);
|
||||||
temp_periods=v.periods(v.periods<=options_.nobs+options_.first_obs);
|
temp_periods=v.periods(v.periods<options_.nobs+options_.first_obs);
|
||||||
|
temp_periods=temp_periods(temp_periods>=options_.first_obs);
|
||||||
M_.heteroskedastic_shocks.Qvalue(v.exo_id, temp_periods-(options_.first_obs-1)) = v.value^2;
|
M_.heteroskedastic_shocks.Qvalue(v.exo_id, temp_periods-(options_.first_obs-1)) = v.value^2;
|
||||||
end
|
end
|
||||||
for k=1:length(M_.heteroskedastic_shocks.Qscale_orig)
|
for k=1:length(M_.heteroskedastic_shocks.Qscale_orig)
|
||||||
v = M_.heteroskedastic_shocks.Qscale_orig(k);
|
v = M_.heteroskedastic_shocks.Qscale_orig(k);
|
||||||
temp_periods=v.periods(v.periods<=options_.nobs+options_.first_obs);
|
temp_periods=v.periods(v.periods<options_.nobs+options_.first_obs);
|
||||||
|
temp_periods=temp_periods(temp_periods>=options_.first_obs);
|
||||||
M_.heteroskedastic_shocks.Qscale(v.exo_id, temp_periods-(options_.first_obs-1)) = v.scale^2;
|
M_.heteroskedastic_shocks.Qscale(v.exo_id, temp_periods-(options_.first_obs-1)) = v.scale^2;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue