If you're trying to generate data from logistic regression's assumed data generating mechanism, your code does not do that. Logistic regression's data generating mechanism looks like $$ \eta = X\beta$$ $$ p = \dfrac{1}{1+e^{-\eta}}$$ $$ y \sim \operatorname{Binomial}(p, n) $$ What it looks like you're trying to do is create a linear regression in the log ...


Yes. $$\begin{align}y_i & =\alpha+(\beta_1+\beta_2)x_1+\beta_2x_2+\epsilon_i\\ \\ & = \alpha+\beta_1x_1+\beta_2x_1+\beta_2x_2+\epsilon_i\\ \\ & =\alpha+\beta_1x_1+\beta_2(x_1+x_2)+\epsilon_i\end{align}$$


For the coefficients and standard errors (and $p$-values) to be identical you would need to have interactions between geneder and all the other variables, and also have separate values of the overdispersion parameter by gender Your interaction model has a separate group coefficient for male and female but has the same coefficients across gender for age, ...

Only top voted, non community-wiki answers of a minimum length are eligible