Page 1 of 1

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

Posted: Sat Dec 02, 2017 12:12 pm
by tvonbrasch
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

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

Posted: Sat Dec 02, 2017 1:47 pm
by EViews Gareth

Code: Select all

y=@round(x,1)

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

Posted: Sun Dec 03, 2017 1:10 pm
by tvonbrasch
Excellent, thanks :)