Pre- and post-treatment binary outcome between treatment groups I have two treatment groups (A and B), where I have a binary outcome of resistance against a particular antibiotic recorded at pre- and post-treatment. I am interesting in determining whether there is a greater risk of developing antibiotic resistance after treatment in group A vs group B. The groups are randomised, so they should be balanced at pre-treatment but I would like to adjust the model for pre-treatment level. I do have some basic covariates (age, sex, etc). Ideally, I would like risk ratio and risk difference (from log and identity link), but I can accept odds ratio if that's the only way. Any ideas? I'm at a loss.

If you have resistance pre-treatment, can you still get resistance (or get rid of it)? Otherwise, I'm not sure whether looking at those with resistance makes sense.
In general, you can get estimates of risk differences and risk ratios by first fitting a covariate adjusted logistic regression, getting the prediction from that model for each patient once assuming treatment A and once assuming treatment B and looking at the difference in average prediction (see Ge et al. 2011). You can get CIs/p-values etc. via the delta-method like in the paper, but also of course via bootstrapping. It turns out that this approach is reasonably robust to model misspecification and is discussed in a recent FDA draft guidance.
Why would you want to fit a logistic regression first? It has a number of nice properties e.g. predicted probabilities will lie in (0, 1) and covariate effects can stay constant across varying levels of risk. With the scales you want to work on (i.e. collapsible but non-transportable effect measures like risk difference and risk ratio, see e.g. Frank Harrell on this and this), you will loose that latter property and the estimated treatment effects cannot apply to any population that is different from your trial population (while with an odds-ratio that could be the case, but of course there's no guarantee that this would be so). However, if you have the original logistic regression, you can at least estimate how the effects on other scales could look like in other populations.
Of course there's also proposed models for risk ratios that allow for covariate adjustment (basically using a log-link function for a binary data model, but one needs to make sure to obtain appropriate confidence intervals e.g. sandwich estimates; see "risk ratio regression") and even models for risk differences (e.g. if you brutally fit a linear regression model aka "the linear probability model" that is popular with some economists, or a regression model for binary data with a linear link function).
