Minimum function

For questions regarding programming in the EViews programming language.

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

memos
Posts: 9
Joined: Tue Jun 03, 2014 7:32 am

Minimum function

Postby memos » Tue Jun 03, 2014 7:40 am

I am solving a model for a panel series which is a share variable, and I want to make sure that the values are less than 100. I couldn't figure out how to use the minimum function in a proper way.

for !obs = @dtoo("2014M02") to @dtoo("2015M12")
smpl 1997M01+!obs-1 1997M01+!obs-1
AAPAgnShr.genr agnshr_? = @min(agnshr_?_0,100)
next

I want to set agnshr_? pooled series to be equal to the minimum of agnshr_?_0 and 100 for each observation after Feb 2014.

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

Re: Minimum function

Postby EViews Gareth » Tue Jun 03, 2014 7:49 am

Code: Select all

agnshr_? = @recode(agnshr_?_0 > 100,100, agnshr_?_0)

memos
Posts: 9
Joined: Tue Jun 03, 2014 7:32 am

Re: Minimum function

Postby memos » Tue Jun 03, 2014 8:02 am

Thanks.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests