This is bang on. Anyone here willing to share how you convince yourself to ask for a pay raise?
Also when you're taking a broader market into consideration, be sure to consider quality of life. Yes I may get more money somewhere, but it might be a miserable product/team/culture which reduces the value of that position. Or I might have a shorter commute, fewer hours or more vacation, which would add to the value of the other position.