I try to round a variable and use gen y=round(x, 0.05).
But the results are not at all what I want and I don't know why.
For instance, 878.784672 gets 878.79999, or 995.4707 gets 995.45001 etc.
In some cases it does it correctly but in most cases not. What's the reason or what is the correct command to round if it's not round()?
Thanks for your help,
Bobby
But the results are not at all what I want and I don't know why.
For instance, 878.784672 gets 878.79999, or 995.4707 gets 995.45001 etc.
In some cases it does it correctly but in most cases not. What's the reason or what is the correct command to round if it's not round()?
Thanks for your help,
Bobby
Comment