genr y=x, where y is rounded to 1 decimal place

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

tvonbrasch
Posts: 372
Joined: Fri Apr 15, 2011 5:35 am

genr y=x, where y is rounded to 1 decimal place

Postby tvonbrasch » Sat Dec 02, 2017 12:12 pm

Hi

I have a series with more than 1 decimal place, say

Code: Select all

x=(3.1432, 4.6632)

Now I want to create a series that is the series x rounded to one decimal place, i.e.

Code: Select all

y=(3.1 , 4.7)


What is the best way of creating such a series? Can it be done with the genr command in an easy way?
Thomas

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

Re: genr y=x, where y is rounded to 1 decimal place

Postby EViews Gareth » Sat Dec 02, 2017 1:47 pm

Code: Select all

y=@round(x,1)
Follow us on Twitter @IHSEViews

tvonbrasch
Posts: 372
Joined: Fri Apr 15, 2011 5:35 am

Re: genr y=x, where y is rounded to 1 decimal place

Postby tvonbrasch » Sun Dec 03, 2017 1:10 pm

Excellent, thanks :)


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 5 guests