saving coefficients from different equations to the same matrix

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

vytama
Posts: 72
Joined: Wed Dec 19, 2012 11:05 am

saving coefficients from different equations to the same matrix

Postby vytama » Thu Jun 10, 2021 7:34 am

Hello,
I have 1 loop and I am looping through 3 separate equations in it. Is it possible to save coefficients from those 3 equations into the same matrix? I can save betas from 1st equation but how do I add betas from other equations?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: saving coefficients from different equations to the same matrix

Postby EViews Gareth » Thu Jun 10, 2021 9:53 am

Follow us on Twitter @IHSEViews

vytama
Posts: 72
Joined: Wed Dec 19, 2012 11:05 am

Re: saving coefficients from different equations to the same matrix

Postby vytama » Thu Jun 10, 2021 11:56 am

Thank you Gareth. It's helpful. What I am looking for is that my loop is forecasting out of sample and it expands by 1 period as the loop runs:

' Estimation sample

%t_insmpl_1 = "1970:1"
%t_insmpl_2 = "1990:12"

' Set out-of-sample estimation period

%t_outsmpl_1 = "1991:1"
%t_outsmpl_2 = "2021:04"

I am able to store constant and beta from first regression in the 1st and 2nd column of the matrix. can I add betas from 2nd regression to 3rd and 4th column of that matrix?

Thank you.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: saving coefficients from different equations to the same matrix

Postby EViews Gareth » Thu Jun 10, 2021 1:00 pm

Sure, if you want to.
Follow us on Twitter @IHSEViews

vytama
Posts: 72
Joined: Wed Dec 19, 2012 11:05 am

Re: saving coefficients from different equations to the same matrix

Postby vytama » Thu Jun 10, 2021 1:28 pm

little help, please: how can I add them?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13307
Joined: Tue Sep 16, 2008 5:38 pm

Re: saving coefficients from different equations to the same matrix

Postby EViews Gareth » Thu Jun 10, 2021 3:16 pm

That post I linked has an example.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 25 guests