What statistical test should I use to look at change in a binary outcome over time? I am designing a study that will look at medication adherence for HIV+ mothers at 6 weeks and 6 months postpartum. The adherence measurement is binary (1= adherent, 0= not adherent) so I will end up with 4 potential outcomes: Y=11, Y=10, Y=01 and Y=00. I want to measure the proportion of women in each group and see if they are statistically significantly different from each other. What statistical test should I use in this case? 
In addition, I am looking at different factors and how they may affect adherence. For example, is the place of delivery (facility or home) related to adherence? What model should I use to look at these effects?    
 A: Two approaches that work in your case are:


*

*Generalized Estimating Equation (GEE), as you indicated in above comment. That definitely works.

*Generalized Linear Mixed Models (GLMM). Of course you would want to choose the logit link.


With above approaches, you can easily incorporate your explanatory variables you wish to investigate into the model. I would not recommend survival-type analysis since you just have two time points since no much time information included.
As for coding the outcome, you can do in the normal way, i.e., y=1 if adherent and y=0 if non-adherent. You will have a time factor with two levels, at 6 weeks or at 6 months, to take care of the correlated outcome measurements. That is, there are two observations associated with each subject ID.
A: If you mean you have visits at 6w and 6mt, then you may be able to determine at what exact day the patients stopped taking their medication, meaning the best way would be survival analysis, with inadherance as "failure" event. Besides showing the Kaplan-Meier curves, you could use a Cox regression model to evaluate the effect of other variables on your outcome. If you have time-varying covariates, like employment, you can model these as such.
If, on the other hand, you only have the 2 timepoints at 6w and 6mt, you could go for a logistic regression model at each of these points, with inadherance as your outcome variable and your measured "risk factors" as explaining variables.
