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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: RE: Re: Capture syntax |

Date |
Fri, 11 Jul 2008 11:49:08 +0100 |

I may be missing something here, but evidently the two P-values can differ. If you want one, don't ask for the other! Nick n.j.cox@durham.ac.uk Janet Hill Thank you for that I agree with the 0.05 but unfortunately I did not write the protocol. The object was to list all the variables that had p<0.05 which worked for ache (0.047) but not for diet (0.114). I realise that I am doing something stupid in the syntax but I can't see it. I thought that I could "automate" the process rather than typing in 50 ologits and examining the results. --- Nick Cox <n.j.cox@durham.ac.uk> wrote: > 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 > n.j.cox@durham.ac.uk > > 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/

**References**:**st: RE: Re: Capture syntax***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: RE: Re: Capture syntax***From:*Janet Hill <janethill73@yahoo.co.uk>

- Prev by Date:
**Re: st: bootstrapping** - Next by Date:
**Re: st: bootstrapping** - Previous by thread:
**Re: st: RE: Re: Capture syntax** - Next by thread:
**Re: st: Re: Capture syntax** - Index(es):

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