Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: Ologit storing p-values up to 10 decimal places
Date   Mon, 08 Aug 2011 19:19:09 +0100

This looks like a job for the -parmest- package, downloadable from SSC )if you have Stata 11 or 12) or from my websire (if you have any of Stata versions 5 to 10). The -parmest- package produces an output dataset (or resultsset) with 1 observation per parameter and data on the parameter estimates, confidence intervals, P-values, or other parameter attributes specified by the user. Multiple resultssets can be concatenated (using -append-), subsetted (using -keep-), sorted (by the P-values or otherwise), and output with whatever format the user wants to specify. And the on-line help for -parmest- contains a lot of hypertext references to Stata Journal articles and Stata User Meeting presentations on -parmest-.

I hope this helps.

Best wishes

Roger


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

Opinions expressed are those of the author, not of the institution.

On 08/08/2011 18:59, Debs Majumdar wrote:
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/
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index