Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Questions related to -predict-, -adjust-, and predictive margins


From   "Michael I. Lichter" <mlichter@buffalo.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Questions related to -predict-, -adjust-, and predictive margins
Date   Wed, 24 Sep 2008 15:53:40 -0400

Question 1: How do you calculate SEs for predicted probabilities for data that require weights or are from a complex sample design? I've seen the FAQ about how to do this in general, but I suspect that the FAQ's advice is not correct for weighted data/data from complex samples.

Question 2: -adjust, pr ci- produces confidence intervals for proportions. Is it not the case that SE = (UB - LB)/(2 * 1.96) given a 95% confidence interval (assuming that weights/design are not a problem)?

Question 3: I want to calculate predictive margins (predictions where every element is treated as if it belonged to a given group, but otherwise the elements' own values are used in the prediction), AND I want to be able to test for equality of predicted proportions. From what I glean from an recent article in NEJM, SUDAAN can do this, but I don't know how.

Here is an example that goes partway there:

. sysuse auto
. gen himpg = mpg > 25

. logit foreign himpg weight
------------------------------------------------------------------------------
foreign | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
himpg | -2.079449 .998357 -2.08 0.037 -4.036193 -.1227054
weight | -.0037159 .0009375 -3.96 0.000 -.0055534 -.0018785
_cons | 9.795139 2.632037 3.72 0.000 4.636442 14.95384
------------------------------------------------------------------------------

. adjust himpg=0, pr ci
--------------------------------------------------------------------------------
Dependent variable: foreign Command: logit
Variable left as is: weight
Covariate set to value: himpg = 0
--------------------------------------------------------------------------------
----------------------------------------------
All | pr lb ub
----------+-----------------------------------
| .193884 [.085888 .381067]
----------------------------------------------
Key: pr = Probability
[lb , ub] = [95% Confidence Interval]

. adjust himpg=1, pr ci

--------------------------------------------------------------------------------
Dependent variable: foreign Command: logit
Variable left as is: weight
Covariate set to value: himpg = 1
--------------------------------------------------------------------------------
----------------------------------------------
All | pr lb ub
----------+-----------------------------------
| .029187 [.003519 .203809]
----------------------------------------------
Key: pr = Probability
[lb , ub] = [95% Confidence Interval]


What can I say about the relationship between the predictions (aside from the obvious facts that they seem to be very different but their CIs are wide and overlap)?

All | pr lb ub
----------+-----------------------------------
| .193884 [.085888 .381067]
| .029187 [.003519 .203809]
----------------------------------------------
Key: pr = Probability
[lb , ub] = [95% Confidence Interval]
Thanks.

Michael

--
Michael I. Lichter, Ph.D.
Research Assistant Professor & NRSA Fellow
UB Department of Family Medicine / Primary Care Research Institute
UB Clinical Center, 462 Grider Street, Buffalo, NY 14215
Office: CC 125 / Phone: 716-898-4751 / E-Mail: mlichter@buffalo.edu

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index