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]
st: AW: AW: outreg2 for pgmhaz8
From
"Martin Weiss" <[email protected]>
To
<[email protected]>
Subject
st: AW: AW: outreg2 for pgmhaz8
Date
Sat, 29 May 2010 20:16:05 +0200
<>
Both models can then be combined into one output set:
*************
sysuse cancer, clear
ge id = _n
recode drug 1=0 2/3=1
expand studytime
bysort id: ge t = _n // 'survival time', t, is # periods at risk per subject
bysort id: ge dead = died & _n==_N // event indicator
// duration dependence: log(time)
ge logt = ln(t)
// first regression
glm dead drug age logt, f(b) l(c) level(95) nolog
outreg2 using myfile, ctitle(PGM hazard model without gamma frailty) replace
//get second result
pgmhaz8 drug age logt, id(id) seq(t) d(dead) nolog
outreg2 using myfile, seeout
*************
You want to be extra careful whether your manual replication of the internal
call that -pgmhaz8- issues to -glm- is correct. You have to make sure, for
instance, that you match the estimation sample (think "`touse'") exactly. So
any -if- or -in- qualifiers need to be in place for the -glm- call. There
may well be other hazards along the way, so compare the output painstakingly
to what -pgmhaz8- returned.
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Martin Weiss
Gesendet: Samstag, 29. Mai 2010 20:06
An: [email protected]
Betreff: st: AW: outreg2 for pgmhaz8
<>
You may be able to rebuild the first result from scratch here. Let me show
you how using the example from the help file:
*************
sysuse cancer, clear
ge id = _n
recode drug 1=0 2/3=1
expand studytime
bysort id: ge t = _n // 'survival time', t, is # periods at risk per subject
bysort id: ge dead = died & _n==_N // event indicator
// duration dependence: log(time)
ge logt = ln(t)
pgmhaz8 drug age logt, id(id) seq(t) d(dead) nolog
//rebuild first regression
glm dead drug age logt, f(b) l(c) level(95) nolog
outreg2 using myfile, ctitle(PGM hazard model without gamma frailty) replace
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Giuliana De
Luca
Gesendet: Samstag, 29. Mai 2010 19:42
An: [email protected]
Betreff: st: outreg2 for pgmhaz8
Dear All,
we have estimated a discrete time hazard model using pgmhaz8.
We wish to report the clololog estimates without gamma frailty using
outreg2. Unfortunately, outreg2 reports only the latest regression
output (i.e. the model with gamma frailty). Does anybody know how to
do it?
Thank you very much.
Giuliana.
*
* 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/
*
* 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/