Marcello--
After installing -moremata-, close Stata and open Stata again. Then
Mata should be able to find everything you need.
On Dec 6, 2007 11:02 AM, Marcello Pagano <[email protected]> wrote:
> Hello,
> I would like to use gsample sampling command for cross validation of my
> regression discontinuity as suggested bu Austin Nichols in "Causal
> inference with observational data".
> The idea is to randomly choose placebo cut off points and test
> continuity of the forcing variable and the outcome variable. Now Nichols
> suggests generating random samples from the data. When using the gsample
> command stata suggests that mm_sample() is required asks me to install
> moremata. Having installed moremata the same problems occurs again. What
> could be the problem. I'm using stata 10.0 and my code looks as follows:
>
> ssc install gsample, replace
> gsample 100, wor gen(pick)
> levelsof x2co if pick==1, loc(p)
> foreach val of local p {
> cap drop newz
> g newz=x2co-'val'
> bootstrap r(d), reps(1000): discont y znew
> bootstrap r(d), reps(1000): discont x2co znew}
>
> Does anyone have an idea what goes wrong with using gsample?
> Thank You in advance,
> Torsten Santavirta
> Helsinki School of Economics
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/