Changes in frequency–size relationship from small to large earthquakes