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

Re: st: predict or adjust after logistic?


From   Joanne Garrett <joanne_garrett@med.unc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: predict or adjust after logistic?
Date   Thu, 24 Apr 2003 13:55:09 -0400

I've just updated predxcat.ado (predictions for categorical X variables)
and predxcon.ado (predictions for continuous X variables) for version
8.0 of Stata to take advantage of the new graphics. These programs
calculated adjusted means or probabilities for linear or logistic
regression. The same results can be accomplished with the "adjust"
command in Stata. However, these programs more easily graph the results,
calculate confidence intervals, add polynomial terms, test for
interaction, etc.  (these are also rewrites of much older programs --
adjmean, adjprop, regpred, and logpred.)  Have posted them to the SSC
list. If anyone is interested in using them, I'd love some feedback.
   Joanne G.

Christer.Thrane@hil.no wrote:
> 
> 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
> 
> or
> 
> logpred , regpred
> 
> or
> 
> The commands at Scott Long's Homepage (http://www.indiana.edu/~jslsoc/)
> 
> Christer
> 
> 
>                       "Daniel, Gregory"
>                       <GDaniel@healthcore.com>         To:       "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
>                       Sent by:                         cc:
>                       owner-statalist@hsphsun2.        Subject:  st: predict or adjust after logistic?
>                       harvard.edu
> 
> 
>                       02.04.03 21:54
>                       Please respond to
>                       statalist
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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