Announcement

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

  • Implementation of DCdensity

    Dear All,

    I'm an user of Stata 14 and I need to run a Mc Cray (2008) test. To do so, I would like to use the DCdensity command as explained here: https://eml.berkeley.edu/~jmccrary/DCdensity/ I put the ado file in my ado Stata folder and then run the code, exactly as in the DCdensity_example.do

    Specifically, I run

    set obs 10000
    gen Z=invnorm(uniform())
    DCdensity Z, breakpoint(0) generate(Xj Yj r0 fhat se_fhat) graphname(DCdensity_example.eps)


    and I get this error message

    option / required
    r(198);


    Does anyone know why and how can I solve this issue?

    Thanks a lot!

  • #2
    Cross-posted at https://stackoverflow.com/questions/...mmand-in-stata by "Joshua Mollner". (presumably that's you, or you're him, somehow). Please note our longstanding request to tell us about cross-posting.

    I don't have access to Stata 14, but I downloaded the code, changed the name inside and out to dcdensity (in my experience using upper case in Stata command names is never necessary and occasionally troublesome).

    In Stata 17 I ran

    Code:
    clear
    set obs 10000
    set seed 2803
    gen Z = rnormal(0, 1)
    dcdensity Z, breakpoint(0) generate(Xj Yj r0 fhat se_fhat) graphname(DCdensity_example.eps)
    which should work in Stata 14 too. The code executed without error, so I cannot reproduce the problem.

    Comment

    Working...
    X