I'm trying to compare proportions in the same sample (e.g, rates of
agreement for 2 the same attitude statement for 2 different drugs). As I
have a student survey, I need to use the robust variance estimator to adjust
for the within-classroom design effect. What I want is an analog of the
paired t-test for binary data, with robust variance estimator. I thought I
could use svylc or svytest, but the only way I can do is after svymean,
resulting in an assumption of normality. Any ideas?
Doing a paired t-test for binary data won't get you far wrong, if your
sample size is large. The variance from the paired t-test is a special case
of the Huber variance for clustered data (where the clusters are the pairs
of responses and the observations are the individual responses). Of
course, it happens to be the maximum-likelihood variance for the bivariate
normal model as well. The main difference is in the degrees of freedom,
which is the number of pairs minus one for a paired t-test.