I am using a dataset which used a complex sampling design and trying to interpret an interaction (2 binary IVs) in logistic regression. The interaction was significant, so I need to get simple slopes as well. I also need to run the model once more with several covariates included. I am creating tables with results in terms of odds ratios and 95% CIs as well as an interaction plot with probability on the Y-axis.
How can I go about this in Stata? The original model gives me the main effects and interaction term in terms of OR, but not simple slopes (for IV2) or probabilities of each condition (e.g., p(DV=1) when IV1=0 IV2=1). Here is the original model code:
I know there are commands which can get me the simple slopes (I think 'margins' and 'contrast'?) in terms of OR with 95% CI as well as the probabilities, but the type of survey means that some of these commands won't work. I would of course like to avoid making calculations by hand to avoid error.
How can I go about this in Stata? The original model gives me the main effects and interaction term in terms of OR, but not simple slopes (for IV2) or probabilities of each condition (e.g., p(DV=1) when IV1=0 IV2=1). Here is the original model code:
Code:
use "/data.dta"; svyset _psu, strata(_ststr) weight(_finalwt) vce(linearized) singleunit(centered) ; svy linearized: logistic DV i.IV1##i.IV2; svy linearized: logistic DV i.IV1##i.IV2 i.cov1 i.cov2 i.cov3
Comment