Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some data corresponding to changes in a binomial variable - i.e, in month 1 there were n1 trials and k1 successes, and in month 2 there were n2 trials and k2 successes. Say I have M of these cases, and in between month 1 and month 2 there were performed a number of different operations (so for case 1 we might have tried treatments a and b, and for case 2 b,c,and d), each of which could have increased or decreased the success rate. I would like to examine the effects of these treatments by regressing on the categorical covariates corresponding to the presence or absence of a,b,c,d,etc - what is the best way to go about this? I suppose I am looking for something analogous to a binomial ancova, but using change in the dependent variable.

share|improve this question
I think we need greater clarity with respect to the timing of interventions and the measurements. If I am reading your question correctly the timing is: A, B, {k1 successes in n1 trials}, B, C, D, {k2 successes in n2 trials}, {k3 successes in n3 trials} etc. I also assume that there are no other treatments beyond the 5 treatments listed. Is the above correct? – user28 Oct 26 '10 at 12:43
Sorry, I think I did not communicate clearly. Case 1 had k_11 successes in n_11 trials in one month, then A and B were applied to Case 1, and then it had k_12 successes and n_12 trials in the following month. – george s Oct 26 '10 at 16:47
Followup - Case 2 had k_21 successes in n_21 trials in one month, then B,C and D were applied to Case 2, and then it had k_22 successes and n_22 trials in the following month. – george s Oct 26 '10 at 16:48
up vote 0 down vote accepted

You are still looking for binomial regression. You have to rearrange the data so that each observation is one set of binomial trials (separately for pre- and post), adding a "time" and "subject" variable. The effect of "time" on the probability of success is like the pre-post difference (on the logit scale), its interactions with the type of treatment are the differential effects of each treatment. The model will need a subject effect as well to capture the baseline of each subject. This could be a fixed or random effect. You should also watch out for overdispersion, and use a quasi-binomial model.

If you don't understand the above, you might need to consult a statistician in real life - there is no simple solution to your problem, and it is easy to mess up.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.