Yes, but there is also the opportunity cost of your downpayment, the transaction costs of getting into and out of a house, and maintenance. Oh man, maintenance.
Ref - transaction costs. You have to figure it will cost you around ~8% of the value of a property to both get into and out of it. This does not include the cost of movers. With a rental your transaction costs might be $50 for the apartment application fee.