In general I do not consider a house to be an investment. An investment is something that you hope will provide a return on your initial capital. Shelter is one of three requirements of life - food, water, shelter. You need it. If you get rid of one type of shelter you MUST find another. You are always paying for shelter in some form or another. Something that always costs money is a liability. "Look how much my house has appreciate!!!" Great, but if you sell then you have to buy something else, which has also appreciated similarly. Rarely can someone just sell a house, take the profit and just have the money without having to use it for another type of shelter. Even if your house is paid off there is still maintenance, taxes, etc. People who buy rental property on purpose are buying a business - shelter for someone else who pays them. People who buy a house for themselves are just getting a liability. Some of them can turn it into a business later or be fortunate enough to sell it at a profit and move to a smaller or cheaper place and thus, make a profit. Most of the people I know who "made" money on houses they lived in ended up putting all the money into a BIGGER house so did they really end up with more money?
When you factor in property taxes, transaction fees such as closing costs, agent commission at sale, etc your house needs to significantly appreciate in order to turn around 3-4 years later with a profit. Buying with the intent of renting later is not a bad idea if you go into it as a goal and eye everything financially from that perspective. The article linked by dwb8p highlights my own experience I have seen with friends - many find that they can't sell and become long distance landlords against their will. For some it works, for some it does not and becomes a giant money and time suck hole.
You mentioned that if you put $26k down then mortgage would be cheaper than rent so you think it is cheaper. Let's take a super simple look at it:
Your example house: $130,000
Down payment of 20%: $26,000 (original loan balance of $104,000)
Purchase fees (points, origination fees, title inspection, home inspection); call it 2% on the LOW end: $2600
Property taxes annually, underestimate at 1.5%: $165 per month
Mortgage; we'll take your number which has a loan interest rate of 5.64%: $600
Total monthly cost of the house in our super simple example: $765.
Assumed rent for similar house: $1000
Difference: $235
3 years later you want to sell your house. Assume it has had traditional long term appreciation of 2.5% per year.
Value of house at time of sale: $140,000
Loan balance at time of sale: $99,600
Difference in sale price and loan balance: $40,400
Real estate commission of 3% sale price: $4200
Total profit from house sale (Difference in sale price - loan balance - purchase fees - real estate commission): $33,600
There are a couple of ways to analyze this.
1. You "invested" $26,000+2,600 = $28,600 (transaction fees always need to be included, just like they are in mutual funds, etc) to end up with $33,600 three years later. A total profit of $5,000. What is the annual rate of return on that? It is 5.38%; actually not terrible, but not spectacular either.
2. You saved $235 per month versus renting. That is a total savings of buying instead of renting over 3 years is $8,460. Hey so it looks like buying and coming out $5,000 ahead versus $8,460 in the whole is a big swing of $13,460! Except that your $26,000 that you had in a mutual fund was tied up in the house the whole time. If you left that in your mutual fund and, for simplicity sake, it made the same 5.38% it would be $30,500 (a $4,500 earnings) after 3 years.
So the real difference is that buying may have made you $500 on your initial investment plus the $8,460 you saved on rent for a grand total of $8,960 saved over three years. That is a net savings of about $248 per month. Keep in mind that people never truly understand is how much money you will spend on a house you OWN versus a place you RENT on things like yard work, blinds, furnishings. You will probably spend far more than that $248 per month on your home than you would have if you rented. I bet as a renter you could easily save an extra $248 or more per month than if you were a home owner. Besides, what if your mutual fund was in a bull market and made 8%, or 15% or 25%? What if it lost 7%? What if the house went down in value because the school districts were rezoned and now your house is in the crappy school district instead of the super awesome one? What if, what if, what if? The point is, it can be very complicated and that 3 years in the real estate market is a gamble and not an investment. And don't underestimate the time, emotion, energy etc involved in buying, owning, and selling a home versus renting.
Renting allows for a lot of freedom. "Well, I wanted to stay here after residency, but I actually don't like it here as much as I thought." "Wow, this neighborhood is not as good as it was when I first moved in." "Wow, the traffic from this part of the city is much worse than where my buddy lives." There are lots of "wow's" in life when you move to a brand new area. Always better to rent for a little while before committing to buy so you can really get a feel for a place.