Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Ologit storing p-values up to 10 decimal places


From   Debs Majumdar <debs_stata@yahoo.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Ologit storing p-values up to 10 decimal places
Date   Mon, 8 Aug 2011 10:59:53 -0700 (PDT)

Hello,

   I am trying to write a code which will go through around 500 ordinal logistic regressions and the output is the id for each of the rs # and the corresponding p-values, where the p-values are sorted in ascending order. i want the p-values reported up to 10 decimal places. This is my code so far. I may be wrong here. How do I make Stata report p-values up to 10 decimal places? Do I need to specify e(b) under display if I want the beta coefficients printed out for each rs #?


~~~~~~~~
local list "age sex c1 c2 c3"
local pvalue = e(p)

foreach `x’ of varlist rs1-rs500 {

quietly ologit outcome `x' `list'

sort pvalue
display `x' pvalue
}

~~~~~~~~

I am using Stata 11.1.

I want the output to show the following:

~~~~

rs5       5e-7
rs493   4e-6
...
...
rs257   0.33

~~~

Thanks,

  Debs


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index