Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • vcetype 'cluster' not allowed

    Dear all,

    I have a weird problem runing my do-file.

    If I run my dofile from the beginning it works till a point where I want to estimate a correlated random effects model.After my command:

    Code:
    xtlogit inlf i.heart2 c.age c.agesq c.num_kids c.net_hh_inc i.year c.heart2bar c.agebar c.agesqbar c.num_kidsbar c.net_hh_incbar if final==1, re vce(cluster pid)
    I get the error message: "vcetype 'cluster' not allowed". So I would expect that I cannot use clustered standart errors in this regression.

    Now the wired thing is that if I start the dofile agian with the problematic comand (without any changes), the command perfectly works and I dont get any error message and the model is estimated. Here is the Output

    Code:
    .....
    . *Coloumn 3 of table 5: CRE with logit
    . xtlogit inlf i.heart2 c.age c.agesq c.num_kids c.net_hh_inc i.year c.heart2bar c.agebar c.agesqbar c.num_kidsbar c.net_hh_incbar if final==1, 
    > re vce(cluster pid)
    vcetype 'cluster' not allowed
    r(198);
    
    end of do-file
    
    r(198);
    
    . do "C:\Users\cschiene\AppData\Local\Temp\STD4114_000000.tmp"
    
    . *Coloumn 3 of table 5: CRE with logit
    . xtlogit inlf i.heart2 c.age c.agesq c.num_kids c.net_hh_inc i.year c.heart2bar c.agebar c.agesqbar c.num_kidsbar c.net_hh_incbar if final==1, 
    > re vce(cluster pid)
    
    Fitting comparison model:
    
    Iteration 0:   log pseudolikelihood = -24591.609  
    Iteration 1:   log pseudolikelihood = -20657.731  
    Iteration 2:   log pseudolikelihood = -20305.965  
    Iteration 3:   log pseudolikelihood = -20301.557  
    Iteration 4:   log pseudolikelihood = -20301.554  
    Iteration 5:   log pseudolikelihood = -20301.554  
    
    ....

    Any idea why this happens or should I contact the technical support?

    Thanks for your help!

  • #2
    Check your version statements. Earlier releases of Stata (before 13 or 14, cannot remember right now) did not accept the vce(cluster ...) option for xtlogit.

    Best
    Daniel

    Comment


    • #3
      Thank you very much! Problem solved

      Comment

      Working...
      X