Hypothesis test for difference-of-differences of proportions? I know how to perform a test of the difference between two proportions. This is one level more complex than that. I have an experiment in which participants (male or female) are randomly assigned to condition A or condition B. Then they have the possibility of making a decision, which we can call Yes or No.
The question of how much condition (A vs. B) affects the probability of a Yes/No decision is central to the study. It is a very gendered situation, so the gender difference (if any) in the extent to which the A/B condition affects the Y/N decision is important.
I am imagining a metric: Difference in proportion saying 'Yes' for condition A versus condition B. So there are two proportions, there.
To finish: I am specifically interested in gender differences for this metric.
In other words, I think what I want to know is:
[Men p(Y | A) vs p(Y | B)] compared to  [Women p(Y | A) vs p(Y | B)]
So... comparison of two proportion-differences? Difference-in-difference? Proportion-of-proportions? This is more complicated than a two-proportion test, and I am sure it is fraught with potential problems. Is there a known procedure for this?

Let's say our model on the log odds scale, allowing for interactions between sex and condition, is
$$ \log \left( \dfrac{p}{1-p} \right) = \beta_0 + \beta_1 I(\mbox{sex = Male}) + \beta_2I(\mbox{Condition=B}) + \beta_3 I(\mbox{Sex = Male and Condition = B)} $$
From here, it is easy to see that $\beta_3$ is the coefficient which determines if there is a sex difference on condition effect, but let's go through the details of making sure this is correct anyway.  The linear predictor for each of the four conditions of Male/Female and A/B is

*

*Female with condition A

$$ = \beta_0 $$

*

*Female with condition B

$$ = \beta_0 + \beta_2 $$

*

*Male with condition A

$$ = \beta_0 + \beta_1 $$

*

*Male with condition B

$$ = \beta_0 + \beta_1 +\beta_2 + \beta_3 $$
The difference for females between conditions is then
$$ = \beta_2 $$
The difference for males between conditions is
$$ = \beta_2 + \beta_3 $$
and the difference of the differences is then
$$= \beta_3$$
So you really just need the hypothesis test for the coefficient of $\beta_3$.
