Average long-term U.S. mortgage rates were mixed this week, marking slight increases or declines but remaining close to high levels for the year.

Mortgage giant Freddie Mac says the average rate on a 30-year fixed-rate mortgage edged up to 4.02 percent this week from 4 percent a week earlier. The rate on 15-year fixed-rate mortgages slipped to 3.21 percent from 3.23 percent.

Mortgage rates have increased in recent weeks, in the midst of the spring home buying season, as the economy has shown signs of improvement.

Government data issued Tuesday showed that purchases of new U.S. homes surged in the Northeast and West last month, as steady job growth over the past year has lifted the housing market. Sales of new homes have soared 24 percent year-to-date.