constrains / boundaries

For questions regarding programming in the EViews programming language.

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

fmantessof
Posts: 23
Joined: Fri Aug 14, 2015 7:54 am

constrains / boundaries

Postby fmantessof » Thu Jul 12, 2018 8:15 pm

I am running a model with different scenarios to forecast vacancy rates in a commercial real estate market. Please see the screenshot attached with the model equations.

I want to restrict the occupied space series (occupspc_sp) to not surpass 95% of the total stock series (stock_sp), so that the vacancy rate (vacan_sp) never goes below 5%. The idea is that if the occupspc_sp series surpass 95% of the stock_sp series EViews would keep the occupspc_sp at the maximum level of 95% of stock_sp. Occupspc_sp is calculated in Eq3 as an inline text equation (identity). Stock_sp is calculated in Eq11 and is also an inline text equation.

How can I accomplish this ?

Thanks
Attachments
Screenshot 2018-07-12 23.45.58.png
Screenshot 2018-07-12 23.45.58.png (94.78 KiB) Viewed 149 times

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

Re: constrains / boundaries

Postby EViews Gareth » Mon Jul 16, 2018 5:31 pm

Use an @recode to impose the restriction.

Code: Select all

Y=@recode(f(X)>.95*Z,.95*Z,f(X))
Follow us on Twitter @IHSEViews

fmantessof
Posts: 23
Joined: Fri Aug 14, 2015 7:54 am

Re: constrains / boundaries

Postby fmantessof » Mon Jul 16, 2018 7:41 pm

Thanks ! Perfect


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 3 guests