Dear all,
working on a paper including a regression discontinuity design (RDD), I’m currently trying to implement the McCrary-Test in Stata (McCrary 2008: http://eml.berkeley.edu/~jmccrary/mc..._DCdensity.pdf), which tests if there systematic sorting below/above the discontinuity threshold of the running variable. Therefore, I use the user-written Stata command “dcdensity” available on Prof. McCrary’s web-site (http://eml.berkeley.edu/~jmccrary/DCdensity/). Unfortunately, I have a problem to run the provided ado-file.
Here is how I proceeded:
First, I saved the ado-file with the test from McCrary’s web-site in my personal ado-directory “ c:\ado\personal\”dcdensity.ado”.
Then, I tried to test the program, using the provided example do-file. Stata returned the error message:
“<istmt>: 3499 DCdensitysub() not found”
I tried to run the ado-file as a do-file. This time, Stata returned the error message:
“ variable loopover undeclared
(0 lines skipped) “
To me, it seems that there is something wrong with the code. Maybe, it’s because I’m using Stata version12, while the command was written in version 9?
I’d be very happy if anyone had an idea how to fix this?!
Many greetings,
Johanna
working on a paper including a regression discontinuity design (RDD), I’m currently trying to implement the McCrary-Test in Stata (McCrary 2008: http://eml.berkeley.edu/~jmccrary/mc..._DCdensity.pdf), which tests if there systematic sorting below/above the discontinuity threshold of the running variable. Therefore, I use the user-written Stata command “dcdensity” available on Prof. McCrary’s web-site (http://eml.berkeley.edu/~jmccrary/DCdensity/). Unfortunately, I have a problem to run the provided ado-file.
Here is how I proceeded:
First, I saved the ado-file with the test from McCrary’s web-site in my personal ado-directory “ c:\ado\personal\”dcdensity.ado”.
Then, I tried to test the program, using the provided example do-file. Stata returned the error message:
“<istmt>: 3499 DCdensitysub() not found”
I tried to run the ado-file as a do-file. This time, Stata returned the error message:
“ variable loopover undeclared
(0 lines skipped) “
To me, it seems that there is something wrong with the code. Maybe, it’s because I’m using Stata version12, while the command was written in version 9?
I’d be very happy if anyone had an idea how to fix this?!
Many greetings,
Johanna
Comment