Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: predict or adjust after logistic?

From   "Daniel, Gregory" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: predict or adjust after logistic?
Date   Thu, 3 Apr 2003 09:41:12 -0500

I have just tried using the predxcat command, but I noticed that the
confidence intervals seem too narrow and are pretty much the same as the
CI's obtained when using: 

Adjust x2 x3 x4, by(x1) pr ci

These CI's are calculated using the standard error from the predicted index,
not the predicted probability---correct?  

Christer wrote:

Check out
Predxcon or predxcat
logpred , regpred

The commands at Scott Long's Homepage (

Greg wrote:

To predict  probabilities and 95% CIs of the predicted probabilities after a
multivariate  logistic model, I have previously used the following predict

logistic y x1 x2  x3
predict lr_index,  index
predict se_index,  stdp

gen p_hat =  exp(lr_index)/(1 +exp(lr_index))
gen lb = lr_index -  invnorm(0.975)*se_index
gen ub = lr_index +  invnorm(0.975)*se_index
gen plb =  exp(lb)/(1+exp(lb))
gen pub =  exp(ub)/(1+exp(ub))
bysort x1: tabstat  p_hat plb pub

However, this code  does not allow me to predict probabilities,
by(x1),�while keeping the other  covariates held constant, as the adjust
command does.

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index