I'm running the following two logistics models, with the only difference being how time is treated (categorical vs. continuous). They are simple modes where time interacts with female.
Model 1, where time is included as indicators:
Model 2, where time is included as a continuous variable:
Here are the results plotted:
model 1 marginsplot:

model 2 marginsplot:

I have three (related) questions:
1. I don't understand why the two plots look so different - does model 1 show instantaneous probability, but model 2 shows cumulative probability? Why is the second marginsplot smoothed like that?
2. How should "time" be treated (indicator vs continuous)? Are there underlying assumptions to go with each?
3. I'm trying to estimate the predicted probability by gender. Are my margins commands correct? For example, should I add options such as atmeans or noesample?
Thank you!
Model 1, where time is included as indicators:
Code:
logit event2 (i.female)##i.enrl_sequence_gap, r margins female#enrl_sequence_gap marginsplot, xdimension(enrl_sequence_gap) plotdimension(female) noci
Model 2, where time is included as a continuous variable:
Code:
logit event2 (i.female)##c.enrl_sequence_gap, r margins female, at(enrl_sequence=(1(1)24)) marginsplot, xdimension(enrl_sequence_gap) plotdimension(female) noci
model 1 marginsplot:
model 2 marginsplot:
I have three (related) questions:
1. I don't understand why the two plots look so different - does model 1 show instantaneous probability, but model 2 shows cumulative probability? Why is the second marginsplot smoothed like that?
2. How should "time" be treated (indicator vs continuous)? Are there underlying assumptions to go with each?
3. I'm trying to estimate the predicted probability by gender. Are my margins commands correct? For example, should I add options such as atmeans or noesample?
Thank you!

Comment