Rounding function
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Rounding function
Is there a function for rounding a series to a certain number of decimal places? All I can find is @round(), which rounds to the nearest integer.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13611
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Rounding function
I believe there isn't. I usually multiply by 100, then divide by 100, if you see what I mean.
I'll see if we can add one though, since it is quite ridiculous we don't have one.
I'll see if we can add one though, since it is quite ridiculous we don't have one.
Re: Rounding function
Your suggestion sounds simple enough. For example, to round to four decimal places:
genr series02 = @round(10000*series01)/10000
A function similar to Excel's ROUND(series01,4) would be nice.
genr series02 = @round(10000*series01)/10000
A function similar to Excel's ROUND(series01,4) would be nice.
Re: Rounding function
Hi, is there already a solution to round a value to certain decimal places.
In my case, I have to generate a third series from two series that are "rounded and reduced" to 2 decimal places.
Any suggestions?
In my case, I have to generate a third series from two series that are "rounded and reduced" to 2 decimal places.
Any suggestions?
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: Rounding function
Following aforementioned suggestions, you can do
Code: Select all
series third = (@round(series*100))/100
Who is online
Users browsing this forum: No registered users and 2 guests
