  Most of our current knowledge on planet formation is still based on the
analysis of main-sequence, solar-type stars. Conversely, detailed chemical
studies of large samples of M-dwarf planet hosts are still missing. We develop
for the first time a methodology to determine stellar abundances of elements
others than iron for M dwarf stars from high-resolution, optical spectra. Our
methodology is based on the use of principal component analysis and sparse
Bayesian's methods. We made use of a set of M dwarfs orbiting around an FGK
primary with known abundances to train our methods. We applied our methods to
derive stellar metalliticies and abundances of a large sample of M dwarfs
observed within the framework of current radial velocity surveys. We then used
a sample of nearby FGK stars to cross-validate our technique by comparing the
derived abundance trends in the M dwarf sample with those found on the FGK
stars. The metallicity distribution of the different subsamples shows that M
dwarfs hosting giant planets show a planet-metallicity correlation as well as a
correlation with the stellar mass. M dwarfs hosting low-mass planets do not
seem to follow the planet-metallicity correlation. We also found that the
frequency of low-mass planets does not depend on the mass of the stellar host.
These results seem in agreement with previous works. However, we note that for
giant planet hosts our metallicities predict a weaker planet metallicity
correlation but a stronger mass-dependency than photometric values. We show,
for the first time, that there seems to be no differences in the abundance
distribution of elements different from iron between M dwarfs with and without
known planets. Our data shows that low-mass stars with planets follow the same
metallicity, mass, and abundance trends than their FGK counterparts.

Solar and Stellar Astrophysics;Earth and Planetary Astrophysics