Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: predict after clogit


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: predict after clogit
Date   Fri, 30 Nov 2007 09:33:37 -0500

Arne,

I knew it was conditional, but since I have only
a couple of small groups (n=2) with no positive outcome,
I did not see why it would change from 45% to 3%.

Moreover, the thread below indicates that -clogit-
should be the better model here, but how can I get
useful predictions out of it?


thanks,
Jeph


Arne Risa Hole wrote:
Hi Jeph,

When you use -predict- with the -pc1- option after -clogit- you get
the predicted probability of a positive outcome _conditional_ on there
being a single positive outcome in each group. I don't believe it is
possible to calculate the unconditional probability since the fixed
effects are not actually estimated. An alternative would be including
the fixed effects manually in the -logit- model, but this leads to
biased coefficient estimates unless the group sizes are large. See the
thread below for a very useful discussion:

http://www.stata.com/statalist/archive/2007-10/msg00935.html

Hope this helps.

Arne

On 29/11/2007, Jeph Herrin <[email protected]> wrote:
I am surprised by the results I am getting from
-predict- after -clogit- and wonder if I am missing
something.


. clogit endpoint age female, strata(site)
[output suppressed]
. predict prob1
(option pc1 assumed; conditional probability for single outcome within
group)
. sum prob endpoint

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       prob1 |       630    .0365079    .0776009   .0053902          1
    endpoint |       630    .4539683    .4982722          0          1


Why is the predicted so far off from the actual? Compare with the logit
model:

. logit endpoint age female
[output omitted]
. predict prob2
(option pr assumed; Pr(endpoint))
. sum prob2 endpoint

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       prob2 |       630    .4539683    .0251972   .4150936   .4819036
    endpoint |       630    .4539683    .4982722          0          1


Am I using -predict- incorrectly after -clogit-? Is it a coincidence
that -invlogit(prob1)- *does* look like the actual.

. gen invlogpr1=invlogit(prob1)
. sum invlogpr1

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
   invlogpr1 |       630    .5090418     .018543   .5013475   .7310586


Thanks for any insights.

Jeph




*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index