IF is not defined

For requesting general information about EViews, sharing your own tips and tricks, and information on EViews training or guides.

Moderators: EViews Gareth, EViews Moderator

dsdsdsdsd
Posts: 21
Joined: Sun Sep 06, 2020 7:33 pm

IF is not defined

Postby dsdsdsdsd » Mon Sep 07, 2020 2:37 am

hello ...

I am getting an error message when I type the following into the command line:

Code: Select all

alpha country
country = "AU" if crossid = 1


if I remove the

Code: Select all

 if crossid = 1
part, the command does fill everything with "AU".

I am using eViews 11 University Edition.

- any thoughts
- thanks, Shannon

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

Re: IF is not defined

Postby EViews Gareth » Mon Sep 07, 2020 6:21 am

You want the @recode command
Follow us on Twitter @IHSEViews

dsdsdsdsd
Posts: 21
Joined: Sun Sep 06, 2020 7:33 pm

Re: IF is not defined

Postby dsdsdsdsd » Mon Sep 07, 2020 3:20 pm

like this:

Code: Select all

@recode country = "9" if crossid = 1
in the command window??

- thanks, Shannon

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

Re: IF is not defined

Postby EViews Gareth » Mon Sep 07, 2020 3:23 pm

You're probably best off reading through the learning resources available.
http://eviews.com/illustrated/illustrated.html
(Chapter 4 especially)

http://eviews.com/Learning/index.html
(Chapter 3)
Follow us on Twitter @IHSEViews

dsdsdsdsd
Posts: 21
Joined: Sun Sep 06, 2020 7:33 pm

Re: IF is not defined

Postby dsdsdsdsd » Mon Sep 07, 2020 3:31 pm

----------------------------------------
this worked:

Code: Select all

COUNTRY=@recode(CROSSID=1,"bbb",COUNTRY)

----------------------------------------


Return to “General Information and Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 16 guests