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

Re: st: predict or adjust after logistic?

From   [email protected]
To   [email protected]
Subject   Re: st: predict or adjust after logistic?
Date   Thu, 3 Apr 2003 07:57:34 +0200

Greg wrote:

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

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

Check out:

Predxcon or predxcat


logpred , regpred


The commands at Scott Long's Homepage (


                      "Daniel, Gregory"                                                                                                        
                      <[email protected]>         To:       "'[email protected]'" <[email protected]>           
                      Sent by:                         cc:                                                                                     
                      owner-statalist@hsphsun2.        Subject:  st: predict or adjust after logistic?                                         
                      02.04.03 21:54                                                                                                           
                      Please respond to                                                                                                        

Dear  Statalist,

However, this code  does not allow me to predict probabilities,
by(x1),�while keeping the other  covariates held constant, as the adjust
command does.� It seems that  keeping the other covariates held constant
while examining the predicted  probabilities�individual covariates is
useful.� Is it possible for me  to do that?

Thanks in  advance.

Greg  Daniel

Gregory  Daniel
Manager, Health Outcomes  Research
Health Core, Inc.

*   For searches and help try:

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