Skip to content
This repository has been archived by the owner on Feb 20, 2022. It is now read-only.

Absolute value needed in stata code for rounding_4sigdig.do #2

Open
jrothbaumcensus opened this issue Aug 9, 2018 · 1 comment
Open

Comments

@jrothbaumcensus
Copy link
Contributor

replace var' = round(var',10^(floor(log10(`var'))-3))
should be:

replace var' = round(var',10^(floor(log10(abs(`var')))-3))

@simsong
Copy link
Owner

simsong commented Aug 9, 2018

Neat. Can you submit a test vector which the original gets wrong and the correction gets right? Either here, or, better, as a pull request?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants