Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Using Margins within a Bootstrapped Program

From   "Stephen Kay (CWW)" <>
To   <>
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

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"

bootstrap _b, reps(10): ste

Many thanks,


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:, Web:
Registered in England No. 2503062 

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index