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: Confidence intervals around ratios/differences of predicted probabilities


From   "P.Praeg" <[email protected]>
To   [email protected]
Subject   st: Confidence intervals around ratios/differences of predicted probabilities
Date   Mon, 12 Aug 2013 11:52:40 +0200

Dear all:

I would like to calculate confidence intervals around ratios and differences of predicted probabilities as obtained from logistic regression models. Is there a straightforward way to calculate these in Stata? Specifically, I am doing the following:

sysuse auto, clear

// I have a logistic regression model with a binary outcome (foreign),
// a set of dummies which denote several groups of interest (i.groups),
// and a vector of controls (not shown here to make things easier):

gen groups = irecode(mpg, 17, 23, 42)  // Creates three groups based on mpg

logistic foreign i.groups

// With the -margins- command, I get predicted probabilities of
// being foreign for each of my groups:

margins i.groups, coeflegend

// What I am interested in then is the difference and the ratio of
// some of these predicted probabilities:

matrix pred_prob = r(table)

  // Difference
di pred_prob[1,3] - pred_prob[1,1]

  // Ratio
di pred_prob[1,3] / pred_prob[1,1]

This now gives me point estimates for the difference and ratio of the predicted probabilities.

My question now is: Is there any straightforward way to obtain confidence intervals around these point estimates?

Thanks for your consideration!
Patrick

--
Patrick Präg
ICS/Department of Sociology
Faculty of Social and Behavioral Sciences
University of Groningen
Grote Rozenstraat 31
9712 TG Groningen, The Netherlands

Tel: +31 (0)50 363 7620
Email: [email protected]

http://www.rug.nl/staff/p.praeg

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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