Statalist


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

RE: st: Help with glm command results display


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Help with glm command results display
Date   Fri, 14 Aug 2009 20:01:11 +0200

<>

As Maarten says, there are easier ways to do this, but if you insist on it, you probably want to use -ssc d parmest- by
Roger Newson:

***
webuse lbw, clear
glm low age lwt smoke ptl ht ui, family(binomial)
parmest, saving(myfile, replace)

u myfile, clear
keep  parm estimate /*
*/stderr z p min95 max95

di in red "`=parm[1]' " %5.4fc `=estimate[1]' /*
*/  " 95%(  " %5.4fc `=min95[1]' ", " /*
*/ %5.4fc  `=max95[1]' " )," " z= " /*
*/ %5.4fc `=z[1]' " , p=  " %5.4fc `=p[1]'

***

HTH
Martin


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten buis
Sent: Freitag, 14. August 2009 19:50
To: stata list
Subject: RE: st: Help with glm command results display

--- Muhammad Riaz wrote:
> I will really appreciate if somebody could help me how to display the
> result of the table  in one line, after running glm command, by writing
> a command line in stata.
>
>  e.g  I want to summarize the table <snip> in one line as:
>
> OR=1.97, 95%(1.34, 0.90), z=3.43, p=0.001
> 
> If I get this in one line result, I can copy it to one cell of a table.
> I am runing a glm command with a loop to get these results for many 
> variables. it will make it easy to put it in a table.

You probably want to use Ben Jann's -estout-. This will make the table 
for you, thus also elimiting the need to cut and paste. To install
-estout- type  in Stata -ssc install estout-.

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      

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