Random effects model handling redundancies I am trying to deal with a time-to-event analysis using repeated binary outcomes.  Suppose that time-to-event is measured in days but for the moment we discretize time to weeks.  I want to approximate a Kaplan-Meier estimator (but allow for covariates) using repeated binary outcomes.  This will seem like a roundabout way to go but I'm exploring how this extends to ordinal outcomes and recurrent events.
If you create a binary sequence that looks like 000 for someone censored at 3 weeks, 0000 for someone censored at 4w, and 0000111111111111.... for a subject who failed at 5w (the 1s extend to the point at which the last subject was followed in the study), when you compute week-specific proportions of 1s you can get ordinary cumulative incidences (until you get to variable censoring times, where this only approximates but doesn't equal Kaplan-Meier cumulative incidence estimates).
I can fit the repeated binary observations with a binary logistic model using GEE, instead of making time discrete as above but instead using a spline in time.  The cluster sandwich covariance estimator works reasonably well.  But I'd like to get more exact inference by using a mixed effects model.  The problem is the that the 1's after the first 1 are redundant.  Does anyone know of a way to specify random effects or to specify a model that takes the redundancies into account so that standard errors will not be deflated?
Note that this setup differs from Efron's because he was using logistic models to estimate conditional probabilities in risk sets.  I'm estimating unconditional probabilities.
 A: As far as I can see with both the GEE or a mixed model for repeated binary observations, you will have the problem that the model will assign a positive probability for a ‘0’ after the first ‘1’ has been observed.
In any case, given that you want to get estimates from a mixed effects logistic regression that will have the same interpretation as in the GEE (see here for more info), you could fit the model using the mixed_model() function from the GLMMadaptive package, and then use marginal_coefs(). For an example, see here.
A: Couple of thoughts about this:


*

*It seems that a mixed-effect model is fundamentally a 'conditional' probability model, i.e., what is the probability of an event for a subject that is at risk for that event.

*We know the probability of a '1' after the first '1' is one. Thus, there is no additional information in the subsequent '1' values.

*It seems that, because subsequent '1' values contain no additional information, they should have no impact on the likelihood function, and thus have no impact on standard errors of likelihood-based estimators, nor the estimates themselves. Indeed, there would be no impact of subsequent '1' values if p(y='1'|x)=1 regardless of model parameter values, as it should be.

*We might be able to force this behavior (i.e., p(y='1'|x)=1), and retain the desired mean function, by adding an indicator covariate to the model that marks subsequent ones, and by forcing its coefficient to be very large so that effectively p(y='1'|x)=1. 

*As you mentioned, there may also be a way to force the first '1' and subsequent responses to have 100% correlation. But in a binomial model, that is the same as p(y='1'|x)=1 for subsequent responses.
A: I'm not exactly sure what you're trying to do, but can you fit a pooled logistic regression model (https://www.ncbi.nlm.nih.gov/pubmed/2281238)? In this case you would only include 1 during the interval of the terminal event -- it would not repeat after the event has occurred.  You would include time in the model in a flexible manner (e.g., expanded using splines).
