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, **statalist.org** is already up and running.

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

From |
Jeph Herrin <stata@spandrel.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Bootstrapping and predicted probabilities |

Date |
Thu, 11 Apr 2013 09:38:30 -0400 |

My first thought is that you should calculate the predicted and expected from the same model, using -xtmelogit-; this is

for b=1/100 { u data, clear bsample logit transfer x1 x2 x3 predict p_pred_`b' keep patientid p_pred_`b' save sample`b' } hope this helps, Jeph On 4/11/2013 7:48 AM, Mohan, Deepika wrote:

Hello, I am trying to figure out how to generate confidence intervals around predicted probabilities at the patient level, using bootstrapping. I am using Stata 12.0 on Windows. I have a Medicare dataset which includes patient-level data, as well as hospital identifiers. The objective is to assess hospital-level variation in the management of trauma patients. I have calculated the expected probability of the outcome (transfer) for each patient:

. logit transfer x1 x2 x3 (where x are patient-level injury characteristics) . predict p_exp,

As well as the predicted probability of the outcome (transfer) for each patient:

. xtmelogit transfer x1 x2 x3 || hospital_id: . predict p_pred, mu

I am now trying to develop confidence intervals around those probabilities, and thought to use the bootstrap command. For example, bootstrap e(p), reps(10) saving(mydata): logit transfer x1 x2 x3 However, when I examine the saved data, what I see is a single predicted probability for each repetition and not 10 predicted probabilities for each individual. In other words, this command seems to be giving me confidence intervals around the mean predicted probability rather than the predicted probability for the individual patient. Is there some way to do this? I should also add that I don't have the ability to upload user programs like prvalue, since my version of stata is run on a secure desktop (no web-access). Any help would be greatly appreciated, Thanks, Deepika Mohan MD MPH University of Pittsburgh Pittsburgh, PA 15261 * * 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/

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

**Follow-Ups**:**Re: st: Bootstrapping and predicted probabilities***From:*Jeph Herrin <stata@spandrel.net>

**References**:**st: Bootstrapping and predicted probabilities***From:*"Mohan, Deepika" <mohand@upmc.edu>

- Prev by Date:
**Re: st: Constructing matrix regressors with thousands of dummy variables** - Next by Date:
**st: Imputing for missing proportions** - Previous by thread:
**st: Bootstrapping and predicted probabilities** - Next by thread:
**Re: st: Bootstrapping and predicted probabilities** - Index(es):