Announcement

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

  • Clustered sandwich estimator gives very differ error in gllamm, xtlogit and xtlogit bootstrap

    Hi there

    I work in the rodent learning field and have been trying to model the effect of different variables on how mice choose different response options. The dependent variable is the binary outcome of a trial (correct/incorrect), Genotype, Sex and Correction_Trial are binary variables. Correction_Trial is 0 if the previous trial is correct and vice versa so we would expect the observation with Correction_Trial==1 to decrease as the mice improve. The mice are trained for multiple trials per day and across many days. The identifier variable for the panel is the individual animals. We wanted to use a robust clustered estimator for the standard errors because we expect there to be heteroskedasticity in at least some of the variables.

    The two models I have tried are xtlogit with vce(robust) (fig.1) and gllamm with cluster (Animal_id) (fig.2). As expected the point estimates for the effect size are very similar between the two models. The error estimates for genotype and sex are very different. My naive understanding is that both models use similar methods to generate clustered robust error estimates but why are they so different. I then tried bootstrapping from the clusters (fig. 3). This gives me errors very similar to the gllamm model. Any idea what's happening? Hope I've explained the question properly.

    Keith


    Fig. 1
    Click image for larger version

Name:	xtlogit vce(robust) fig 1.jpg
Views:	1
Size:	48.6 KB
ID:	1483378



    Fig. 2

    Click image for larger version

Name:	gllamm cluster.jpg
Views:	1
Size:	45.7 KB
ID:	1483379


    Fig. 3
    Click image for larger version

Name:	xtlogit bootstrap.jpg
Views:	1
Size:	52.6 KB
ID:	1483380

  • #2
    You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output (fixed spacing fonts help), and sample data using dataex. Avoid posting pictures. Look at what you posted - I can't read it. Being able to replicate your problem helps us help you.

    I can't answer what I think is your question. Try to repost following the FAQ and see if you get a better response.

    Comment


    • #3
      The output should also go between code delimiters. When, as Phil suggest, you read the FAQ , you willl encounter:
      In particular, please do not post screenshots.
      Steve Samuels
      Statistical Consulting
      [email protected]

      Stata 14.2

      Comment

      Working...
      X