I have a dataset that looks like the following

id | time | trial  | success | other covariates 
1    0  10    4    
1    1  23    10     
1    2  100   29     
2    0  5     1   


this is basically a panel aggregated logistic regression. Can someone point me towards a package I can use for grouped logistic PANEL regression? I am aware of PGLM package in R I tried to use stata with xtlogit but it wouldn't take grouped logistic with fweight options. What I am looking for is something like blogit in stata but something that can take panel data. I'd presume the function would be called xtblogit but it doesn't exist.

Thank you!

  • 1
    $\begingroup$ Can you clarify what you mean by panel and aggregated in this context? Or even better, provide some data that works in R or Stata but for which you're not quite getting the result you want. I'm thinking that what you're looking for in R is a glmm with id as a random effect and the 2 column response, but your terminology is making it hard to see if that's true. $\endgroup$ – atiretoo Jul 2 '12 at 22:41

If you have a reasonably recent version of Stata (version 10, released 2007, or above) you can use the xtmelogit command. While xtlogit fits only a random intercept, xtmelogit allows you to specify more random effects. Depending on your model, you may or may not want to make use of that. But xtmelogit also has a binomial(varname)option that allows for grouped binomial data of the form you have.

Alternatively, if the random-intercept model is sufficient and you prefer to use xtlogit with its somewhat simpler syntax, you could convert your data into the form it wants by 'de-aggregating' it. Joseph Hilbe wrote an unblock command ages ago to make that easier: type findit unblock to install it.

  • $\begingroup$ thank you for the help i also found gllamm and denom() option is also useful $\endgroup$ – David Lee Jul 4 '12 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.