# Modeling influence of social impact with linear regression

Is it right to use linear regression to make a forecast based on social media impact?

Suppose you have the next dataset (events), where time delta is amount of minutes passed from the previous event:

+-----------------------------------------+
|event  time   current   # of related     |
| id    delta   price    Google's articles|
+-----------------------------------------+
|  1     1      50.60      110            |
|  2     15     50.71      120            |
|  3     38     50.85      120            |
| ...    ...     ...       ...            |
| 100    4      80.70      120            |
| 101    8      80.71      120            |
| ...    ...     ...       ...            |
| 203    61     90.01      142            |


I'm confused about two things that make me hesitate about applicability of linear regression here:

1. Social media (# of related articles) influence current price, but not immediately. The delay might be from few hours up to few days/weeks. That means that # of related articles is always outdated to current price. All I figure out - is to calculate average delay of social media impact and shift current price data relative to # of related articles. Is there any better solutions?
2. current price is updating much frequently than social media impact (# of related articles). I.e. in data example below you see that price growth from 50.60 up to 80.71 thanks for increase of # of related articles from 110 to 120. But from event id 2 up to event id 203 # of related articles remains the same. Is linear regression able calculate correct coefficients based on this data? Any tricks?
• Within the disipline of time-series analysis, the "shifting" you discuss is more traditionally referred to as lag — the term used by @Grosvenor below. It's quite common in time-series analysis to regress on lagged time series, and even on multiple lags of the same time series. Under #2, you have a missing data problem, which might be solved by interpolation or smoothing. Thus 'accessorized' by these additional techniques, regression remains technically a feasible and appropriate approach to your problem. Commented Sep 8, 2017 at 21:34
• @DavidC.Norris thanks, your comment is really usefull
– VB_
Commented Sep 11, 2017 at 9:45