-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run more than one exogenous variable #46
Comments
I had similar challenge, please let some kindly help
…Sent from my iPhone
On 25 Aug 2023, at 2:36 AM, hlcny ***@***.***> wrote:
Hi,
I am running a BVAR and am attempting to include more than one exogenous variable. With the exact same "opts" variable I am able to run my model with all endogenous variables. When I then include one exogenous variable (e.g., oil supply) it runs fine, when I include another exogenous variable (e.g., global supply chains) it runs fine, but when I attempt to include them both at the same time it fails. This happens with all exogenous variables I've attempted, when trying to include more than one (e.g., oil supply and a GFC dummy variable). I don't believe this is a data issues, as each variable I've tried runs fine by itself.
The code seems to run fine, up until it crashes with these errors:
Index in position 1 exceeds array bounds.
Error in bear.hd_new_for_signres (line 127)
value = hd_estimates2{ii,jj}(1,kk);
Error in bear.hdecomp_inc_exo (line 64)
[hd_estimates]=bear.hd_new_for_signres(const,exo,beta,k,n,p,D,m,T,X,Y,data_exo,IRFt,labels);
Error in BEARmain (line 1061)
[hd_record,favar]=bear.hdecomp_inc_exo(beta_gibbs,D_record,opts.It,opts.Bu,Y,X,n,m,p,k,T,data_exo,exo,endo,const,IRFt,strctident,favar);
Thanks for any advice on a fix!
Hunter Clark, International Research Department, FRBNY
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
|
I wanted to add oil prices, food prices, and metal prices as exogenous to my endogenous variables but failed as explain above. Kindly help
…Sent from my iPhone
On 25 Aug 2023, at 6:19 AM, Danladi N Saba ***@***.***> wrote:
I had similar challenge, please let some kindly help
Sent from my iPhone
>> On 25 Aug 2023, at 2:36 AM, hlcny ***@***.***> wrote:
>>
>
> Hi,
> I am running a BVAR and am attempting to include more than one exogenous variable. With the exact same "opts" variable I am able to run my model with all endogenous variables. When I then include one exogenous variable (e.g., oil supply) it runs fine, when I include another exogenous variable (e.g., global supply chains) it runs fine, but when I attempt to include them both at the same time it fails. This happens with all exogenous variables I've attempted, when trying to include more than one (e.g., oil supply and a GFC dummy variable). I don't believe this is a data issues, as each variable I've tried runs fine by itself.
>
> The code seems to run fine, up until it crashes with these errors:
>
> Index in position 1 exceeds array bounds.
>
> Error in bear.hd_new_for_signres (line 127)
> value = hd_estimates2{ii,jj}(1,kk);
>
> Error in bear.hdecomp_inc_exo (line 64)
> [hd_estimates]=bear.hd_new_for_signres(const,exo,beta,k,n,p,D,m,T,X,Y,data_exo,IRFt,labels);
>
> Error in BEARmain (line 1061)
> [hd_record,favar]=bear.hdecomp_inc_exo(beta_gibbs,D_record,opts.It,opts.Bu,Y,X,n,m,p,k,T,data_exo,exo,endo,const,IRFt,strctident,favar);
>
> Thanks for any advice on a fix!
> Hunter Clark, International Research Department, FRBNY
>
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you are subscribed to this thread.
|
Updating my original post: after walking through the code and looking at the errors, it appears that the bug, at least in my use case, can be isolated to the historical decomposition section. With the exact same opts variable that does not run with more than one exogenous variable, setting the HD variable to zero allows the code to run to completion without error. So the only workaround in my current use case is to bipass the hd section by setting it to "off". Additional comment: as per a request on how to implement this workaround: if you are setting up a model using the BEAR interface, on the page "APPLICATIONS", be sure the switch under "Application options" for "Historical decompositions" is set to "No". However, probably the easiest way to implement this if you already have an "opts" BVARsettings configuration variable set up, but which has failed due to more than one exogenous variable, is to double click on the opts variable in your workspace, look for the property "HD" and manually set it to zero. Then run BEARmain(opts). [Note: the opts variable is the variable that is constructed by the BEAR interface when you click on "Quick Export to Workspace"]. |
Nice one, let see if that will work in my own case. Thanks
…Sent from my iPhone
On 25 Aug 2023, at 3:35 PM, hlcny ***@***.***> wrote:
Updating my original post: after walking through the code and looking at the errors, it appears that the bug, at least in my use case, can be isolated to the historical decomposition section. With the exact same opts variable that does not run with more than one exogenous variable, setting the HD variable to zero allows the code to run to completion without error. So the only workaround in my current use case is to bippass the hd section by setting it to "off".
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Kindly share a screenshot or record of how you mean ***@***.***
…Sent from my iPhone
On 25 Aug 2023, at 4:51 PM, Danladi N Saba ***@***.***> wrote:
Nice one, let see if that will work in my own case. Thanks
Sent from my iPhone
>> On 25 Aug 2023, at 3:35 PM, hlcny ***@***.***> wrote:
>>
>
> Updating my original post: after walking through the code and looking at the errors, it appears that the bug, at least in my use case, can be isolated to the historical decomposition section. With the exact same opts variable that does not run with more than one exogenous variable, setting the HD variable to zero allows the code to run to completion without error. So the only workaround in my current use case is to bippass the hd section by setting it to "off".
>
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you commented.
|
Hi,
I am running a BVAR and am attempting to include more than one exogenous variable. With the exact same "opts" variable I am able to run my model with all endogenous variables. When I then include one exogenous variable (e.g., oil supply) it runs fine, when I include another exogenous variable (e.g., global supply chains) it runs fine, but when I attempt to include them both at the same time it fails. This happens with all exogenous variables I've attempted, when trying to include more than one (e.g., oil supply and a GFC dummy variable). I don't believe this is a data issues, as each variable I've tried runs fine by itself.
The code seems to run fine, up until it crashes with these errors:
Index in position 1 exceeds array bounds.
Error in bear.hd_new_for_signres (line 127)
value = hd_estimates2{ii,jj}(1,kk);
Error in bear.hdecomp_inc_exo (line 64)
[hd_estimates]=bear.hd_new_for_signres(const,exo,beta,k,n,p,D,m,T,X,Y,data_exo,IRFt,labels);
Error in BEARmain (line 1061)
[hd_record,favar]=bear.hdecomp_inc_exo(beta_gibbs,D_record,opts.It,opts.Bu,Y,X,n,m,p,k,T,data_exo,exo,endo,const,IRFt,strctident,favar);
Thanks for any advice on a fix!
Hunter Clark, International Research Department, FRBNY
The text was updated successfully, but these errors were encountered: