Statalist


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

Re: st: AW: clogit vs. logit


From   "Regina Kemmler" <[email protected]>
To   [email protected]
Subject   Re: st: AW: clogit vs. logit
Date   Tue, 10 Nov 2009 10:31:55 +0100

Hi Martin,
thanks for your answer. I also had the problem of convergence when I tried to calculate models 2,3 and 4 with clogit. But model 1 works fine with my data. 


An excerpt of my data looks as follows:
       id       IV   DV1   DV2 |
     |-------------------------|
  1. | 1         0    0     0 |
  2. | 1         0    0     0 |
  3. | 1         0    0     0 |
  4. | 1         0    0     0 |
  5. | 1         1    0     0 |
     |------------------------|
  6. | 1         1    1     1 |
  7. | 1         1    2     4 |
  8. | 1         1    3     9 |
  9. | 1         1    4    16 |

do clogit and logit come to the same results given that I seperate the data by id? 
Or is there another way to model my probelm? It needn't be done with clogit. I think one big problem is that I separate my data by ids. And clogit also separates by id but doesn't give separate coefficients for each household.





-------- Original-Nachricht --------
> Datum: Tue, 10 Nov 2009 10:05:14 +0100
> Von: "Martin Weiss" <[email protected]>
> An: [email protected]
> Betreff: st: AW: clogit vs. logit

> 
> <> 
> 
> When I try your lines 
> 
> *************
> keep if (id==1)
> clogit IV DV1 DV2, group(id)
> *************
> 
> with the example in the help file for -clogit-, I just can`t get
> convergence...
> 
> *************
> webuse lowbirth2, clear
> keep if pairid==1
> clogit low lwt smoke ptd ht ui i.race, group(pairid)
> *************
> 
> Is this what you mean by "Unfortunately the clogit doesn't work for all
> models."?
> 
> 
> HTH
> Martin
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Regina
> Kemmler
> Gesendet: Dienstag, 10. November 2009 09:57
> An: [email protected]
> Betreff: st: clogit vs. logit
> 
> Dear Statalist,
> 
> I'd like to conduct a clogit analysis.
> I have a sample of several household for whom I'd like to calculate the
> beta
> coefficient for 4 different models and conduct the likelihood ratio test
> afterwards to test which model fits best. Unfortunately the clogit doesn't
> work for all models. But as the clogit and logit are supposed to give the
> same results given you have one group I did the following syntax.
> 
> keep if (id==1)
> clogit IV DV1 DV2, group(id)
> gen b1_DV1=_b[DV1]
> gen b1_DV2=_b[DV2]
> gen lik1=e(ll) 
> estimates store m1
> 
> logit IV DV2
> gen b2_DV2=_b[DV2]
> gen kons2=_cons
> gen lik2=e(ll)
> estimates store m2
> 
> logit IV DV1
> gen b3_DV=_b[DV]
> gen kons3=_cons
> gen lik3=e(ll)
> estimates store m3
> 
> logit IV
> gen kons4=_cons
> gen lik4=e(ll)
> estimates store m4
> 
> lrtest m1 (m2 m3 m4), stats
> 
> 
> Is it okay to mix up clogit and logit? Does it really give the same
> results?
> Why is it then not possible to calculate clogit on the latter 3 models?
> And:
> is it possible to conduct a likelihood ratio test if I mix up clogit and
> logit?
> 
> Your help is much appreciated!
> Thanks a lot,
> Regina
> 
> 
> 
> -- 
> Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5
> -
> sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser
> *
> *   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/

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index