## 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

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: 12912
Joined: Tue Sep 16, 2008 5:38 pm

### Re: Forecast Evaluation with Constrained Coefficients

Question is a little vague.

Forecast evaluation has nothing to do with whether the coefficients are constrained or not.

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

### Re: Forecast Evaluation with Constrained Coefficients

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: 12912
Joined: Tue Sep 16, 2008 5:38 pm

### Re: Forecast Evaluation with Constrained Coefficients

Code: Select all

`ls Y=c(1) + c(2)*Y(-1) + c(3)*X1 + (1-c(3))*X2`

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

### Re: Forecast Evaluation with Constrained Coefficients

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: 12912
Joined: Tue Sep 16, 2008 5:38 pm

### Re: Forecast Evaluation with Constrained Coefficients

Ah, sorry I misread.

Code: Select all

`ls Y=c(1) + c(2)*Y(-1) + X1 + X2`

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

### Re: Forecast Evaluation with Constrained Coefficients

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: 12912
Joined: Tue Sep 16, 2008 5:38 pm

### Re: Forecast Evaluation with Constrained Coefficients

Just what I put in.

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

### Re: Forecast Evaluation with Constrained Coefficients

Ah, that worked. Thank you so much :)