Convert values to numerical values

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Convert values to numerical values

Postby Pantera » Wed Jan 06, 2021 1:02 pm

Hello all,

I have a variable (let's say a variable X) which has negative and positive values. Problem: I want to make a variable Y which is the numerical value of X (all values are positive). I guess it is possible to use the genr-function to do the converting, i.e. Genr Y = ???? -- but how do we do it?

Regards,
T.L.

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

Re: Convert values to numerical values

Postby EViews Gareth » Wed Jan 06, 2021 1:55 pm

Not sure on your terminology - negative numbers are still "numerical".

But perhaps you want the @abs function?

Code: Select all

series Y = @abs(X)
Follow us on Twitter @IHSEViews

Pantera
Posts: 44
Joined: Mon Dec 21, 2009 5:32 am

Re: Convert values to numerical values

Postby Pantera » Wed Jan 06, 2021 3:32 pm

Thanks Gareth -- problem solved. You understood me correctly. I meant "absolute value" :-)

Regrads,
T.L.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 23 guests