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: bootstrap [was: Hi Maarten]
From
Maarten buis <[email protected]>
To
stata list <[email protected]>
Subject
st: bootstrap [was: Hi Maarten]
Date
Thu, 3 Mar 2011 08:58:19 +0000 (GMT)
--- Michael Palmer wrote me privately:
> Sorry to bother you but would you mind looking
> at this do-file and telling me where it is
> going wrong.
>
> I am getting the following error message:
>
> bootstrap p=r(`prod2'), nodrop: twopart
> (running twopart on estimation sample)
> nothing found where name expected
> error in expression: r()
> r(198);
The relevant sections of the .do file are:
> capture program drop twopart
> program twopart, rclass
> <stuff>
> return scalar `prod2' = `m_1'*`m_3' - `m_2'*`m_4'
> end
>
> twopart
> return list
> bootstrap p=r(`prod2'), nodrop: twopart
First of all do not contact members of the statalist
privately with such questions, that is where the
statalist is for:
<http://www.stata.com/support/faqs/res/statalist.html#private>
Second, choose your subject line a bit more carefully.
Normally I would automatically move emails from unknown
persons with such a subject line directly in the spam
folder. It is just that Palmer happens to be the name of
the mayor of my town that I got curious enough to open it.
To answer your question: Change
return scalar `prod2' = ...
to
return scalar prod2 = ...
and
bootstrap p=r(`prod2'), nodrop: twopart
to
bootstrap p=r(prod2), nodrop: twopart
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/