Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: bootstrapping when setting cmd in an ado file
From
Matthias Schonlau <[email protected]>
To
[email protected]
Subject
st: bootstrapping when setting cmd in an ado file
Date
Thu, 22 Jul 2010 13:44:45 +0200
Dear statalisters,
(Using stata Version 10.1, Windows, 32 bit)
I wrote a (long) ado file called rds. One of the functions inside the ado
file sets cmd:
ereturn local cmd="bootstrap"
If I set cmd="bootstrap", the program and bootstrapping the program work
fine.
However, I believe cmd should be set to the ado program name
ereturn local cmd="rds"
When I do this , the program rds works , but bootstrapping rds does not
work:
. bootstrap _b , reps(2500) notable : rds key, id(id) degree(degree)
recruiter_id(p_id) recruiter_var(p_key)
(running rds on estimation sample)
variable degree not found in option degree()
an error occurred when bootstrap executed rds
r(111);
Two comments:
1) the option "degree" specifies the name of a variable in the data set. I
am not sure whether this matters.
2) As required, I am setting "esample"
gen esample =`touse'
ereturn post b, esample (esample)
I would greatly appreciate any comments.
Best wishes,
Matt
Matthias Schonlau, Ph.D.
German Institute for Economic Research (DIW)
RAND Corporation, Pittsburgh, PA , USA
Phone (49) 30 -89789 - 319
Mail: DIW Berlin, 10108 Berlin, Germany
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/