Doppler-based planet surveys have discovered numerous giant planets but are incomplete beyond several AU . At larger star-planet separations direct planet detection through high-contrast imaging has proven successful , but this technique is sensitive only to young planets and characterization relies upon theoretical evolution models . Here we demonstrate radial velocity measurements and high-contrast imaging can be combined to overcome these issues . The presence of widely separated companions can be deduced by identifying an acceleration ( long-term trend ) in the radial velocity of a star . By obtaining high spatial resolution follow-up imaging observations , we rule out scenarios in which such accelerations are caused by stellar binary companions with high statistical confidence . We report results from an analysis of Doppler measurements of a sample of 111 M-dwarf stars with a median of 29 radial velocity observations over a median time baseline of 11.8 years . By targeting stars that exhibit a radial velocity acceleration ( “ trend ” ) with adaptive optics imaging , we determine that 6.5 \pm 3.0 \% of M dwarf stars host one or more massive companions with 1 < m / M _ { J } < 13 and 0 < a < 20 AU . These results are lower than analyses of the planet occurrence rate around higher mass stars . We find the giant planet occurrence rate is described by a double power law in stellar mass M and metallicity F \equiv [ Fe/H ] such that f ( M,F ) = 0.039 ^ { +0.056 } _ { -0.028 } M ^ { 0.8 ^ { +1.1 } _ { -0.9 } } 10 ^ { ( 3.8 \pm 1.2 ) F } . Our results are consistent with gravitational microlensing measurements of the planet occurrence rate ; this study represents the first model-independent comparison with microlensing observations .