Frequency variation is used in frequency compounding. A phase inversion harmonic image is compounded with a downshift harmonic image. The depths for downshifting fractional harmonics are determined based on a signal-to-noise ratio of the harmonic information at a given harmonic. The depth for transition between one type of harmonic imaging (e.g., phase inversion) and another (e.g., downshifted harmonic) is determined based on a similarity of the one type with noise. Weights used for frequency compounding are determined based on a difference between noise and one of the types of data to be compounded, and spatially steering angles.