Bookmark and Share

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: Using Margins within a Bootstrapped Program


From   "Stephen Kay (CWW)" <[email protected]>
To   <[email protected]>
Subject   st: Using Margins within a Bootstrapped Program
Date   Fri, 26 Aug 2011 16:04:46 +0100

I'm trying to generate a graph showing bootstrapped confidence intervals
of predicted probabilities (Y axis) from a logit model with price on the
X axis.
There are many ways of doing this but can someone please tell me why the
following command returns a "no observations" error message, and can
they suggest how it can be remedied without taking out the Margins
command. 

sysuse auto,clear

program define ste, eclass
logit  foreign price mpg 
margins, at(mpg=21.29 price=(3000(1000)12000)) nose
tempname bb
matrix `bb' =r(b)
ereturn post `bb'
ereturn local cmd="bootstrap"
end

bootstrap _b, reps(10): ste

Many thanks,

Steve







This email may contain confidential or legally privileged information, intended only for the addressee.
If you have received this email in error, you are hereby notified that any disclosure, copying, distribution or reliance upon the contents of this email is strictly prohibited. Please contact the sender to arrange for correct delivery, and then delete this email.

Any views or opinions presented in this email are those of the author. Please check the email for viruses, as the sender accepts no liability for damage caused by a virus transmitted via this email.

Registered Office: Complete Medical Group Worldwide Ltd. Complete House, 19-21 King Edward Street, Macclesfield, Cheshire SK10 1AQ, UK
Tel: +44 (0)1625 624000, Fax: +44 (0)1625 619812, Email: [email protected], Web: www.completeworldwide.com
Registered in England No. 2503062 


*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index