Hi, I am no expert but just trying to help. Do not directly go for the factory reset. First thinks in this path. Before this problem started,
1) Did you or someone dropped the phone recently or put weight on the phone either by sitting with the phone in your back pocket or accidentlly sat or stepped on it or put pressure on it?
If the above one is the case you might have a screen problem and had to get replaced.
2) This is a little unlikely but, what are very recent updates or apps that were installed before the problem has started?
Applications are less likely cause this problem but sometimes updates can.
Just to be on the safe side let's check the solutions for the 2nd question first and then go for the 1st one.
Try to uninstall the most recent app you have installed (before the problem started) and restart the phone and check if the problem is solved. Repeat this step for may be 2 or 3 apps. If this does not fix it then go for a factory reset (factory reset is for checking the possibility of the problem with the updates) but do not forget to backup.
Still having the problem? Then think of the 1st question... Do some more research on line and if you cannot find and reasonable solution anywhere you have to get your screen replaced.
All these questions and steps are to pick and eliminate the causes of the issue safely. Hope this helps.