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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: lincom output into a formatted table


From   Eduardo Nunez <enunezb@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: lincom output into a formatted table
Date   Wed, 11 Apr 2012 15:17:31 -0400

Dear Statalisters,
I would appreciate any help in how to get the results from a lincom
command into a formatted table (either MS Word or Excel).
Knowing that lincom save the results as r(estimate), r(se) and r(df),
how can I get the results expressed in the table as exp_coeff,
P-value, and 95% CI(lb - ub).
Is there an automated way to do it?
I have tried lincomest, from Roger Newson (ssc), but is not compatible
with stpm2 from Patrick Royston.

Here is an example:
stset exitusev_days, f(exitusev) id(pid) scale(365.25)
stpm2 edad_1 bnp_i_1 pcr_i_1 bbloq aco estatina i.nyha
i.iBUNQ2_ca35##FED_120_1, scale(hazard) df(3) eform
testparm iBUNQ2_ca35#FED_120_1

lincom 1.FED_120_1 + 1.iBUNQ2_ca35#1.FED_120_1, hr cformat(%3.2f)
lincom 1.FED_120_1 + 2.iBUNQ2_ca35#1.FED_120_1, hr cformat(%3.2f)
lincom 1.FED_120_1 + 3.iBUNQ2_ca35#1.FED_120_1, hr cformat(%3.2f)
lincom 1.FED_120_1 + 4.iBUNQ2_ca35#1.FED_120_1, hr cformat(%3.2f)

Table
Categories     HR     P-value     95% lower bound - 95% upper bound
C1                X.XX     0.XXX         1.XXX - 1.XXX
C2                X.XX     0.XXX         1.XXX - 1.XXX
C3                X.XX     0.XXX         1.XXX - 1.XXX
C4                X.XX     0.XXX         1.XXX - 1.XXX

Best wishes,
Eduardo
*
*   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