I agree that buying a new $20K car is often a better choice than buying a $20K used car. However, if you are stuck on a certain model, it can much less expensive to buy used, regardless of used car operating costs. This is NOT true of entry level cars unless you're willing to go really old, but for upper-scale models, it makes a ton of sense. We bought our 09 Corolla new because a three year old Corolla is just not a good buy. You have to go to 5-7 year old versions to see any significant price drop, and we didn't want one that old. Personal preference, and it cost us some dough. But...
To purchase our Forester new would have been about $35K, and we bought a three year old one for $16K. That savings of $19,000 will NEVER be eaten up by additional repair/service costs. Never. Even at "Alberta Advantage" labour rates of $140/hr and buying expensive Subaru OE parts (makes our past Mercedes and BMW parts prices seem downright cheap), that cost of initial depreciation is so high, it could only be eclipsed if you rebuilt the entire drive-line several times.
But, when you buy a $15-20K used car, you have to have the cash flow to be able to spend a bit more on service and repairs. If your MAX budget is $18K and that would leave you super-tight for repairs, then look for an inexpensive new car. There are awesome, reliable, choices now for $15K or less. The local Mazda dealer is advertising a 2009 Mazda3 with AT/AC for $16K including PDI/etc plus GST. That's CHEAP for a new car! We paid $18K for a 1990 Acura Integra in the fall of 1989, and wasn't close to the car that the 3 is. Wow. 20 years later and you spend FAR LESS in real dollars for WAY MORE car.
So, it depends on what you want. If you have your heart set on a Subaru Legacy, they don't hold their resale value very well (overpriced to start?) and you'll save $20K by hitting the used market for a 3-4 year old lease return. I see 06 GT models for well under $20K now, way off the nearly $40K tax-in prices from just three years ago. The warranty will run out soon, but they're well made cars and you can expect years and years of reliable service. Yes, it will cost more to operate than a new Civic/Corolla/Elantra/Fiesta/Sentra, but it's a different kind of car.
As for buying an entry level car, if you go for a Corolla and you think you might sell it someday, opt for an automatic. An AC/AT equipped car is 100X easier to sell. You can gripe all you like about fun-to-drive, but the reality is that a Corolla is a commuter car that spends a lot of time in heavy traffic, and an AT is preferable for the majority of people looking for that sort of car.