Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re: Capture syntax


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: Capture syntax
Date   Fri, 11 Jul 2008 11:16:51 +0100

I don't follow this. Your results for diet show a P-value of 0.0407
which Stata is evidently happy to consider as < 0.05. 

A quite separate point is that to many conservative statisticians your
P-values no longer have the orthodox interpretation after this shotgun
screening process. 

Nick
[email protected] 

Janet Hill

I have to run typically 50 variables separately in
ologit as part of a screening process and some of the
models fail with no convergence. I have tried the
following to trap the error and continue the analysis:

set more off
foreach x of var chew speech appear1 ......{
capture quietly ologit `x' wmean if surface==1
	if _rc==0 & chi2tail(e(df_m),e(chi2)) < 0.05 di "`x'"
}
set more on

Hoping just to print out those  variables with a model
probability < 0.05.

This typically produces several variables:
ache
diet
glass
etc.
When I subsequently analyse these variables the model
associated with ache has p<0.05, but diet does not

.. ologit ache wm if surface==1,nolog

Ordered logistic regression                      
Number of obs   =         15
                                                  LR
chi2(1)      =       4.83
                                                  Prob
> chi2     =     0.0280
Log likelihood = -16.888841                      
Pseudo R2       =     0.1251

------------------------------------------------------------------------
------
        ache |      Coef.   Std. Err.      z    P>|z| 
   [95% Conf. Interval]
-------------+----------------------------------------------------------
------
       wmean |    1.23758   .6219381     1.99   0.047 
   .0186035    2.456556
.. ologit ache wm if surface==1,nolog


.. ologit diet wm if surface==1,nolog

Ordered logistic regression                      
Number of obs   =         15
                                                  LR
chi2(1)      =       4.19
                                                  Prob
> chi2     =     0.0407
Log likelihood = -3.7955935                      
Pseudo R2       =     0.3556

------------------------------------------------------------------------
------
        diet |      Coef.   Std. Err.      z    P>|z| 
   [95% Conf. Interval]
-------------+----------------------------------------------------------
------
       wmean |  -1.967477    1.24521    -1.58   0.114 
  -4.408044    .4730897

I would be grateful if somebody could point out my
programming error.

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