WASHINGTON — Improved weather conditions following a long winter and improved optimism about the national economy may be the driving forces behind the rise in the National Restaurant Association’s Restaurant Performance Index this past May. The R.P.I. rose to 102.1 in May, up 0.4% compared to April and the highest level the index has achieved since May 2012.

“Positive sales results fueled the May increase in the R.P.I., as nearly two-thirds of restaurant operators said their same-store sales rose above year-ago levels,” said Hudson Riehle, senior vice-president of the Research and Knowledge Group for the N.R.A. “In addition, restaurant operators are increasingly optimistic about continued sales gains in the months ahead, a sentiment that is also showing up in their capital expenditure plans.”

The R.P.I. is comprised of two components, the current situation index and the expectations index. In May, the current situation index stood at 102, up 0.7% compared to April. A majority of restaurant operators reported higher same-store sales, with 65% reporting a same-store sales gain between May 2013 and May 2014, up from 51% in April and the highest proportion since March 2012. Only 19% of operators reported a same-store sales decline in May, down from 26% who reported similarly in April.

Restaurant operators also reported stronger customer traffic levels in May.  Forty-seven per cent said they experienced an increase in customer traffic levels between May 2013 and May 2014, while 29% reported a decline. In April, 44% of operators said their traffic rose from the previous year, while 30% reported a decline.

The expectations index stood at 102.2 in May — unchanged from April’s level. Restaurant operators are increasingly optimistic about their sales prospects in the coming months. Fifty per cent of restaurant operators expect to have higher sales in six months (compared to the same period in the previous year), up from 46% in April and the strongest level in nearly two years. Only 8% of restaurant operators expect their sales volume in six months to be lower than it was during the same period in the previous year, down from 11% last month.

While the sales outlook is generally positive, restaurant operators’ view of the economy remains somewhat clouded.  Twenty-eight per cent of restaurant operators said they expect economic conditions to improve in six months, while 15% expect the economy to worsen. The remaining 57% expect economic conditions in six months to be about the same as they are now.