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

st: RE: Using "makematrix" with "logistic"


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Using "makematrix" with "logistic"
Date   Mon, 1 Sep 2003 11:16:04 +0100

siyama@who.int
 
> I am very thankful to Nick Cox for putting together 
> "makematrix". I have
> tried it to save and return the AIC and Schwarz's Criterion 
> from a few logit
> models and his suggestions worked well.
> 
> It will helpful to me if I can first obtain a matrix of the 
> "Odds Ratio z
> P>|z| [95% Conf. Interval]" produced by "logistic" but I am 
> not sure to
> which global macros S_E_** are those saved (I have had a 
> look through
> logistic.ado, logistic.dlg,logis_lf.ado).
> 
> I guess I am looking at a 3-step process:
> 
> 1. a do-file is first saved as "mydo1.do" containing one 
> command line
> 		xi : logistic lbw i.`1'
> 
> 2. a second do-file "mydo2.do" is saved containi
ng two command lines
> 		xi : logistic lbw i.`1'
> 		mlfit 
> 
> 3. Then the command lines below run to obtain the two 
> matrix outputs:
> 
> 	makematrix, from(S_E_**): "run D:\mydo1" stunt3 stunt6 stunt12
> 
> 	makematrix, from(S_E_aic S_E_sc): "run D:\mydo2" stunt3 stunt6
> stunt12
> 

I am a bit confused on what you want. Your request
says one thing, but your example says another. 

However, I don't know a way to use -makematrix- to pick up 
odds ratios, etc., after -logistic-. These are not 
within its scope. Sorry. Perhaps Roger Newson's suite 
can do this. 

Moreover, you want to be able to say 

	S_E_**

(strictly, I think you mean "S_E_??") 
to pick up a list of globals via a wildcard. 
I don't think anything in Stata is that smart. 
The idea of a wildcard applies in Stata to varlists 
or to numbered lists of local `1', `2', etc. 
I am not aware that it extends beyond those. 
Certainly -makematrix- is not that smart. 

Nick 
n.j.cox@durham.ac.uk 

*
*   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–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index