Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Nick Cox <njcoxstata@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: glm for binomial regression with |

Date |
Thu, 21 Apr 2011 01:07:54 +0100 |

I guess this was a puzzling question because as David clearly indicates it depends on how the experiment was conducted and we don't know what he doesn't tell us. My take is simple. If replicates mean that you should reach for -xt- analyses then the same argument goes for any ties observed on predictors. That is, if the argument is that values that are similar on predictors should be grouped then it applies also to those that arise by chance and not just by design. In experimental practice the intention is clearly to give the same dose, or whatever, but in practice the received dose will not be identical even if what is recorded is the same number, so experimental set-ups don't differ so much from observational set-ups as is sometimes implied. Otherwise, the key point with -xt- is that there is other information, typically in categorical variable form, indicating that observations should be grouped. A simple example would be if data came from different laboratories, so that even if everyone was trying to follow the same protocol, there could still be all sorts of differences. An even simpler argument is that is this is how the analysis should be done, should not be most applications of -anova- be revisited? Nick On Wed, Apr 20, 2011 at 7:46 PM, Airey, David C <david.airey@vanderbilt.edu> wrote: > . > > I see the cloglog link in xtgee, and I have just one level of clustering, so this is a possibility. > >> 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? >> * * 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/

**References**:**st: glm for binomial regression with***From:*"Airey, David C" <david.airey@vanderbilt.edu>

- Prev by Date:
**Re: st: How to combine variables in network data - can I loop over stubs?** - Next by Date:
**Re: st: screen shot** - Previous by thread:
**st: glm for binomial regression with** - Next by thread:
**Re: st: glm for binomial regression with** - Index(es):