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

 From Steven Samuels To statalist@hsphsun2.harvard.edu Subject Re: st: Questions related to -predict-, -adjust-, and predictive margins Date Wed, 24 Sep 2008 17:07:12 -0400

Michael:

Question 1: See http://www.stata.com/statalist/archive/2008-09/ msg00667.html Be sure to zap gremlins in a good text editor before using.

Question 2: I'll send you a file privately which plots predictions for a range of values of each variable, holding the others at their means. It is a little long to list here, though you can see a version at: http://www.stata.com/statalist/archive/2008-09/msg00221.html

Question 3: I'll leave to someone else.

In my examples I use the built-in auto data and predict foreign as a function of mpg, weight, and turnk. I've found that holding all variables at their means (typical values) leads to very *atypical* predictions. The predicted value at the means is about 15%, but the average of the predicted values is about 29% (this is also, by the mechanics of maximum likelihood, the same as the crude or weighted proportion).

-Steve
On Sep 24, 2008, at 3:53 PM, Michael I. Lichter wrote:

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.

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