Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • distrate in Stata17

    I cannot run "distrate" in Stata 17 with the following error message.
    "command _crccip is unrecognized"

    I know "_crccip" was replaced with other command.

    Is there any way I can run "distrate" in Stata 17?

  • #2
    Following the guidance given by Rafal Raciborski (StataCorp) in the Statalist post at

    https://www.statalist.org/forums/for...34#post1397934

    you can create your own _crccip command that produces the same results.
    Code:
    capture program drop _crccip
    program define _crccip, rclass
        args k level
        local alpha = (100-`level')/200
        return scalar upper = invpoisson(`k',`alpha')
        return scalar lower = cond(`k'==0, 0,invpoisson(`k'-1,1-`alpha'))
    end
    If you add this code to your do-file before it runs distrate your problem will be resolved, I believe.

    Do not put this code within a loop or any other block of code that ends with a "}" or "end". Many Stata users would put it near the top of their do-file.

    Reproducing the examples in the post gives results identical to those shown from the original _crccip in that post.
    Code:
    . _crccip 2 95
    
    . return list
    
    scalars:
                  r(lower) =  .2422092785439654
                  r(upper) =  7.224687667723954
    
    . _crccip 0 95
    
    . return list
    
    scalars:
                  r(lower) =  0
                  r(upper) =  3.68887945411394
    
    .
    Last edited by William Lisowski; 23 Feb 2022, 14:31.

    Comment


    • #3
      Thank you, William. Your codes worked perfectly! Now I can graduate my old-version Stata!

      Comment


      • #4
        keep Stata and community-contributed packages updated. see -help update- and -help adoupdate-

        current distrate -ssc desc distrate- Distribution-Date: 20170928 does not depend on _crccip.

        Comment


        • #5
          Note that adoupdate will not help if you have installed the version of distrate from the Stata Journal, whose listing st0276_1 precedes the listing of distrate from SSC in the output of search distrate. That is not an uncommon problem with packages installed from SJ - that is, the user may insall the older package without seeing the newer version, and search makes no connection between the SJ and SSC versions, so having installed the SJ version the user will not know there is a later version in SSC.

          What is required to replace the SJ version with the SSC version is
          Code:
          ssc install distrate, replace

          Comment

          Working...
          X