Getting the wrong sign on a coefficient in logistic regression? I'm trying to make a logistic regression model explaining whether a law passed last year has affected my dependent variable. My most important variable (an indicator variable for whether the law was in effect for a given observation with 1=law and 0=no law) has the wrong sign. Before the law came into effect, the dependent variable event happened 40% of the time (n=250), and after the law came into effect the event happened 56% of the time (n=40). However, the coefficient for the Law variable is negative and odds ratio below 1.
I am also using Date (or number of days after the first observation, as I coded it) as a variable. This is because frequency of the event was on an increasing trend over time, and I want to see if the increase in events after the law is due to the law itself or simply a continuation of the trend over time.
There are other control variables, but the sign on Law is only wrong when Date is included in the model. When I interact these two, the coefficient on Law is -50, the coefficient on the interaction term is 35, and the coefficient on Date is near 0. The law is significant with and without interaction, but not when Date is not included in the model.
Am I getting the wrong sign because these two variables (Law and Date) are collinear? If so, how would I go about figuring out what I want to know– whether the increase in events after the law was passed is due to the law or due to a continuation of the already-existing increasing trend?
Also- standardizing/normalizing Date has no or little effect.
Thank you so much for any advice or help, this has been a very confusing endeavor when I thought it was going to be quite simple.
 A: One way to look at this is that your probability of "success" (occurrence of your dependent variable) is a function of time. When you introduce the dummy at a fixed time point, you introduce a discontinuity into the time trend.  In your model, this appears to be estimated as a drop at that time point, which I gather is not what you were hoping for.
On the other hand, one does not expect things to happen instantaneously, as your  discontinuity model would suggest. It is somewhat encouraging from your perspective that your interaction is positive, because that suggests a steeper trend after than before.
Some caveats. First, time trends are not linear. They can be tricky to estimate because they generally do not follow nice function forms.  Some kind of non- or semi-parametric smoothing trick might be preferred to estimate the time function.  Second, you have one time function before the law, and another after the law.  How to string those together will be tricky.  A dummy variable introduces an instantaneous jump that seems inappropriate given that things take time to have an effect.  Third, it seems that you really don't have enough data to do estimate everything as well as you would like to. Fourth, causality will be hard to claim in this context.
