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

Re: st: saving odds ratios for logistic models

From   Jeph Herrin <>
Subject   Re: st: saving odds ratios for logistic models
Date   Thu, 30 Jul 2009 11:45:39 -0400

You don't say if you want the standard errors, or
how you want to save them (variables? macros?) but
this will give an idea for saving in local macros;
the coefficients are saved in the matrix e(b), so:

 xi : logit depvar indvar1 ...
 matrix b=e(b)
 local or1=exp(el("b",1,1))
 local or2=exp(el("b",1,2))

etc. will store the ORs in the locals or1, or2, etc.

If you want to pick out certain ones, you can look up
how to reference matrix elements by their row and column
names; the column names of matrix b are just the names of
the variables in the model.


Miranda Kim wrote:
Would anyone be able to help me with this...
How can I save the odds ratio produced when using xi: logitic ?
Many thanks!

*   For searches and help try:

*   For searches and help try:

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