That's not true. The amount of time you need to stay in a house vs. renting is variable base on a number of factors. Among them are the cost of the house you would buy compared to the cost of rent among other considerations. Google "Rent vs. Buy" and you will find a number of comparison calculators. The one from the NYT is particularly good and tells you how long you need to stay in a particular house to make it better than renting financially speaking.
http://www.nytimes.com/interactive/2014/upshot/buy-rent-calc...