2016 was a strong year for the stock market overall. The Dow Jones Industrial Average rose by 13.4%, the S&P 500 gained 9.5%, and the NASDAQ added a respectable 7.5%. All three of these indexes reached record highs during the year. However, the real estate sector was a laggard, and some companies performed particularly poorly. Here's why real estate didn't do so well, and some equity REITs you might want to pick up on sale.

These REITs are on sale, and could be great long-term investments. Image Source: Getty Images.

Why did real estate underperform in 2016?

^SPX Chart

^SPX data by YCharts

Real estate was officially separated into its own sector (it was formerly a part of the financials sector) in late August 2016. The newly defined sector consists of equity real estate investment trusts (REITs) -- which are REITs that own properties -- as well real estate service companies. The sector notably excludes mortgage REITs, which remain with financials. About 87% of the real estate sector is made up of equity REITs, so the real estate sector's performance is a good approximation of how equity REITs are doing.

There are many factors that went into the performance of individual REITs in 2016, but the major factor in the sector's lousy performance in the second half of the year was interest rates.

Specifically, rising interest rates are bad for REITs for a couple of reasons. Most obviously, higher interest rates translate to higher borrowing costs when acquiring properties. Second, rising rates creates selling pressure on REIT stocks, as dividend investors can now get higher returns from risk-free investments, and now expect higher yields from "riskier" investments like REITs.

While the prospect of higher interest rates may have caused a decline in REITs, there are many whose businesses are doing just fine. Here are three types of REITs, all of which declined in 2016 and are now worth a look.

Self-storage REITs have a big margin of safety

To be fair, self-storage REITs tend to be a little more volatile than many other types, in part because of their short leases. Self-storage facilities tend to lease their space on a month-to-month basis, which can put them at a disadvantage during weak economic times when compared to say, retail REITs whose tenants sign 20-year leases.

Having said that, investors with a long investment time horizon may want to consider some of the leading self-storage REITs, particularly Public Storage (PSA 0.43%) and Extra Space Storage (EXR 0.25%).

Public Storage is the largest in the industry, and is one of the largest public REITs of any kind. As an industry leader, Public Storage enjoys economies of scale, which add to the inherent margin of safety that comes with the low operational and turnover costs of storage facilities. In fact, Public Storage's facilities are more than 95% occupied, and the company has previously said that it could break even with an occupancy rate of just 30%.

Extra Space Storage isn't quite as big as Public Storage, but it has grown rapidly over the past decade and continues to do so at a rapid pace. The company has a total market cap of about $10 billion, and has acquired $4.8 billion in properties over the past five years.

Image Source: Extra Space Storage.

Both REITs are smart long-term investments as we head into 2017, especially considering that Public Storage and Extra Space Storage fell by 10% and 12%, respectively, in 2016.

Apartments in growing, affluent markets

More Americans are renting rather than buying homes than any time since 1965, and demographic trends point toward even more renters in coming years, especially in metropolitan markets. Corporations are actively moving from suburban locations into cities, and projections call for urban population growth to outpace growth in the suburbs through at least 2050.

Image Source: Equity Residential.

A great way to play the "nation of renters" is with apartment REITs AvalonBay Communities (AVB 1.24%) and Equity Residential (EQR 1.29%). These two companies have similar business models. Both acquire, develop, and operate apartment properties in high-growth, high-barrier markets, such as San Francisco, New York City, and Boston, just to name a few. Basically, these are places where it's expensive to own a home, jobs are being created, and it's difficult to develop a new apartment complex. This combination results in lower-than-average vacancy rates, and high-income tenants.

Both are similar in size -- AvalonBay with about 280 apartment properties and Equity with 315. And while both do acquire existing properties, their preferred method of growth is through development, which creates instant value for investors and results in higher operating margins.

Healthcare real estate is growing, and is recession-resistant

As a final suggestion, one of my favorite REITs as we head into 2017 is healthcare giant Welltower (WELL 0.64%).

First, healthcare real estate is one of the more defensive types of properties to own. Not only do tenants of these properties sign long-term leases, but healthcare itself is recession-resistant. After all, people still need medical attention no matter what the economy is doing.

Second, the U.S. population is aging rapidly, which is expected to create an increased need for healthcare facilities. The 65-and-over population is expected to roughly double by 2050, and the 75+ and 85+ age groups are growing even faster than that. Similar trends are occurring in Canada and the U.K., Welltower's other markets. This should be a positive catalyst for Welltower in particular, since senior housing and long-term care properties make up 83% of the portfolio.

Image Source: Welltower.

Finally, there is significant room for consolidation among existing healthcare real estate. No REIT has more than a 3% market share, and less than 15% of all healthcare properties are owned by REITs.

Welltower is an industry leader with a 45-year track record of dividend growth and outstanding returns, and there's no reason to believe that will change anytime soon.

Invest with the long term in mind, and you'll do well with any of these

Keep on thing in mind -- none of these stocks are without risk, especially over shorter time periods. If interest rates end up rising even faster than the market expects, it's entirely possible that all of these REITs will have another year of dismal performance in 2017.

Having said that, all five of these are good values at their current share prices, and if you approach them as long-term investments, you should enjoy strong performance and income growth for decades to come.