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

Update rounding_4sigdig.do #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 10, 2018

  1. Update rounding_4sigdig.do

    Log of existing code and fix
    
    Log of code as before and with fix:
    
    . gen test = -123456
    
    . replace test = round(test,10^(floor(log10(test))-3))
    (10 real changes made, 10 to missing)
    
    . sum test
    
        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
            test |          0
    
    . 
    . replace test = -123456
    (10 real changes made)
    
    . replace test = round(test,10^(floor(log10(abs(test)))-3))
    (10 real changes made)
    
    . sum test
    
        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
            test |  10     -123500           0    -123500    -123500
    jrothbaumcensus committed Aug 10, 2018
    Configuration menu
    Copy the full SHA
    48daec9 View commit details
    Browse the repository at this point in the history