I think there is a lot that is missing. You have not factored that rents can go up whereas a fixed rate mortgage stays the same over time. At some point there is an inflection point.
Secondly you have not accounted for leverage. A home is one of the only assets that allow you to borrow 5 x (assume 20% down) the amount that you are putting down.
Tax shelter. Not ony do you get the tax deduction but you also get to keep up to 500K in gains without paying taxes.
Estate planning. You can take your home as an asset and pass it down to your family members and they get the benefit of the new cost basis.
If you have children and plan on sending them to college. You can qualify for far more financial aid in the form of grants and subsidies by being house rich and savings poor.
(Federal Financial Aid does not count your home into the calculation for aid)
Long term diversification. If you plan wisely an home represents just one asset class of a long term financial plan. You can still use the 401K/403B, the Roth IRA, and Brokerage accounts to accumulate wealth in a number of different asset classes (large cap/small cap/gold/REITS/ commodities etc) along with you ownership in a home.
This is just some quick bullet points on the matter.