Homeownership has risen to its highest levels since 2014, causing analysts and investors to wonder whether the rental market’s good times are ending

Rising homeownership is adding to the jitters in the residential rental market, which has slumped recently after a long stretch near the top of the commercial real-estate industry.

For most of the current economic expansion, declining ownership rates have enabled landlords of apartments and single-family homes to raise rents far faster than the pace of inflation. Demand has been fueled by the millions of people who haven’t had the money, credit or desire to pursue the traditional American dream.