Hello,

I am trying to fit a logistic model that contains an interaction between a continuous and categorical covariate. Here is my syntax:

Code:
xtgee dy_will_infoshare  i.ego_race    ///
 i.alter_homeless i.gender_female_temp  close_alter i.relationshiptype i.paid_o_forsex_recat ///
  i.hivrisk_alter_recode length_rx_years c.close_alter#i.relationshiptype , eform

margins i.relationshiptype, at (close_alter=(0(5)10)) atmeans vsquish
marginsplot, noci
When I plot the interaction using margins plot, the Y axis is labelled "Linear Prediction" with values that exceed 1. Given that my outcome is a binary variable, I would love to have the Y-axis represent predicted probabilities bounded by 0 and 1.

I would appreciate some assistance in doing this. Thanks in advance, cY