Homeownership is not always better than renting — but often it is. Here is the framework for making the right financial decision for your specific situation.