Constrained Coefficients

For questions regarding programming in the EViews programming language.

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

Laurel
Posts: 19
Joined: Mon May 04, 2020 2:39 pm

Constrained Coefficients

Postby Laurel » Thu Mar 11, 2021 6:42 pm

How do I perform forecast evaluation if some of the coefficients must equal one?
For example, how to do forecast evaluation for these two models:

y = c(1)y(-1)
y = c(2)y(-1) + c(3)x1 + c(4)x2
with the condition that c(3) and c(4) are both equal to one, i.e. c(3)=c(4)=1?

Thanks!
Last edited by Laurel on Thu Mar 11, 2021 8:46 pm, edited 1 time in total.

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

Re: Forecast Evaluation with Constrained Coefficients

Postby EViews Gareth » Thu Mar 11, 2021 7:11 pm

Question is a little vague.

Forecast evaluation has nothing to do with whether the coefficients are constrained or not.
Follow us on Twitter @IHSEViews

Laurel
Posts: 19
Joined: Mon May 04, 2020 2:39 pm

Re: Forecast Evaluation with Constrained Coefficients

Postby Laurel » Thu Mar 11, 2021 7:27 pm

Ok. To clarify, I have time series data y, x1, and x2. How do I estimate

y = c(1) + c(2)y(-1) + c(3)x1 + c(4)x2

with the condition that c(3) and c(4) are both equal to one, i.e. c(3)=c(4)=1?

Thanks!

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

Re: Forecast Evaluation with Constrained Coefficients

Postby EViews Gareth » Thu Mar 11, 2021 7:44 pm

Code: Select all

ls Y=c(1) + c(2)*Y(-1) + c(3)*X1 + (1-c(3))*X2
Follow us on Twitter @IHSEViews

Laurel
Posts: 19
Joined: Mon May 04, 2020 2:39 pm

Re: Forecast Evaluation with Constrained Coefficients

Postby Laurel » Thu Mar 11, 2021 7:51 pm

I mean c(3)=1 and c(4)=1, not c(3)+c(4)=1. Thanks.

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

Re: Forecast Evaluation with Constrained Coefficients

Postby EViews Gareth » Thu Mar 11, 2021 8:10 pm

Ah, sorry I misread.

Code: Select all

ls Y=c(1) + c(2)*Y(-1) + X1 + X2
Follow us on Twitter @IHSEViews

Laurel
Posts: 19
Joined: Mon May 04, 2020 2:39 pm

Re: Forecast Evaluation with Constrained Coefficients

Postby Laurel » Thu Mar 11, 2021 8:20 pm

How exactly do I type that onto the command window without Eviews computing the coefficients for c3 and c4?

Code: Select all

ls y c y(-1) x1 x2

Thanks!

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

Re: Forecast Evaluation with Constrained Coefficients

Postby EViews Gareth » Thu Mar 11, 2021 8:25 pm

Just what I put in.
Follow us on Twitter @IHSEViews

Laurel
Posts: 19
Joined: Mon May 04, 2020 2:39 pm

Re: Forecast Evaluation with Constrained Coefficients

Postby Laurel » Thu Mar 11, 2021 8:30 pm

Ah, that worked. Thank you so much :)


Return to “Programming”

Who is online

Users browsing this forum: Google [Bot] and 23 guests