Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# st: glm for binomial regression with

 From "Airey, David C" To "statalist@hsphsun2.harvard.edu" Subject st: glm for binomial regression with Date Wed, 20 Apr 2011 11:17:18 -0500

```.

I have questions about binomial regression.

On page 527 of the Stata 11 -glm- help in the [R] base reference PDF manual is described in Example 2 a binomial data set which describes the death of beetles for a dose response experiment (ldose = log dose, n = total number of beetles, r = number dead):

. list , clean

ldose    n    r
1.   1.6907   59    6
2.   1.7242   60   13
3.   1.7552   62   18
4.   1.7842   56   28
5.   1.8113   63   52
6.   1.8369   59   53
7.    1.861   62   61
8.   1.8839   60   60

The data is modeled by:

glm r ldose, family(binomial n) link(logit)

or

glm r ldose, family(binomial n) link(cloglog)

where the cloglog links allows the dose curve to be asymmetric. In these data the cloglog link fits better than the logit link.

I have data like the above, except with replications at each dose.

The manual also says the data could be analyzed by expanding the data and using -logit- (if the logit link was the better fit).

I have two questions.

Unlike the data above, I have replications for each dose. Is this -xt- or clustered data?

The data above are already grouped and beetles are replicates, but we have:

. list , clean

ldose    n    r
1.   1.6907   59    6
2.   1.6907   62    5
3.   1.6907   62   10
4.   1.6907   59    3
etc.

I could ignore the potential clustering and simply model n = 59+62+62+59 and r = 6+5+10+3. I guess it depends on how the experiment is actually done, and I could test for clustering too.

My second question, however, is if I were to expand the data above that included a replication by dose (with appropriate replicate id variable included as the cluster id), I could analyze this using xtlogit or xtmelogit---but how do you do this if you want asymmetry, like you get with glm and the cloglog link? Is that available in glm but not xt models in Stata?

-Dave
*
*   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/
```