# In a binary logistic regression context, how to introduce a constraint to model the dependency between consecutive samples

Imagine we are running a logistic regression to identify opportunities for car sale promotion, using previous promotion campaign's result. Each $$y$$ is the increase of car sale after the promotion.

However, there is a problem here: once we launch a campaign and boost the sales for a specific month, another campaign in the next month won't boost the sales anymore, because anyone who wants to buy a car would have bought it in the first promotion.

Therefore, although the samples are independent, the results of the regression are NOT independent, because we are dealing with a dynamic system.

Probably we can add some predictors into the regression model, such as 'duration since last promotion', to make the prediction more realistic. That being said, just from a theoretical perspective, without introducing any new predictors, is there a way to introduce a constraint into the regression model, so that the resulting positive predictions are 'sparse' in some sense?

There are several ways we can define sparsity here. In a simple sense, we can demand that, if one sample is classified as $$1$$, the next $$k$$ samples must be $$0$$, or cannot contain more than $$n$$ $$1$$'s.

Or, we can demand that the sum of the distance between consecutive $$1$$'s must be above a threshold.

I don't really have a concert idea here. I think this looks like a control problem, similar to LQR.

Can anyone share some ideas or provide some references?

• If $y$ is your dependent variable, why are you using logistic regression (let alone binary logistic, which would mean a binary d.v.)? Why not a linear model (treating $y$ as roughly continuous)?
– prubin
Oct 14, 2019 at 21:14
• By the way, you might want to look at time series intervention analysis. See, for instance, econometricsense.blogspot.com/2012/01/….
– prubin
Oct 14, 2019 at 21:16
• Maybe better asked at stats.stackexchange.com Oct 15, 2019 at 12:04