Skip to content
Snippets Groups Projects
Commit 837451c7 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

MS-SBVAR: support annual data (fix thanks to Margarita Zabelina)

parent e4546ba3
Branches
Tags
No related merge requests found
......@@ -141,6 +141,8 @@ for i = 1:lags
sgpbid((i-1)*nvar+j) = lagdecay^2/sgsh(j); % ith equation
elseif (q_m==4)
sgpbid((i-1)*nvar+j) = (1/i^mu(4))^2/sgsh(j); % ith equation
elseif (q_m==1)
sgpbid((i-1)*nvar+j) = (1/(i*4)^mu(4))^2/sgsh(j); % ith equation
else
error('Incompatibility with lags, check the possible errors!!!')
%warning('Incompatibility with lags, check the possible errors!!!')
......
......@@ -163,6 +163,8 @@ for i = 1:lags
sgpbid((i-1)*nvar+j) = lagdecay^2/sgsh(j); % ith equation
elseif (q_m==4)
sgpbid((i-1)*nvar+j) = (1/i^mu(4))^2/sgsh(j); % ith equation
elseif (q_m==1)
sgpbid((i-1)*nvar+j) = (1/(i*4)^mu(4))^2/sgsh(j); % ith equation
else
error('Incompatibility with lags, check the possible errors!!!')
%warning('Incompatibility with lags, check the possible errors!!!')
......
......@@ -176,8 +176,11 @@ if (options_.ms.freq==12)
elseif (options_.ms.freq==4)
nStart=(yrStart-options_.ms.initial_year )*4+qmStart-options_.ms.initial_subperiod ; % positive number of months at the start
nEnd=(yrEnd-options_.ms.final_year )*4+qmEnd-options_.ms.final_subperiod ; % negative number of months towards end
elseif (options_.ms.freq==1)
nStart=(yrStart-options_.ms.initial_year )*1+qmStart-options_.ms.initial_subperiod ; % positive number of months at the start
nEnd=(yrEnd-options_.ms.final_year )*1+qmEnd-options_.ms.final_subperiod ; % negative number of months towards end
else
error('Error: this code is only good for monthly/quarterly data!!!')
error('Error: this code is only good for monthly/quarterly/yearly data!!!')
return
end
%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment