  We analyze the role of first (leading) author gender on the number of
citations that a paper receives, on the publishing frequency and on the
self-citing tendency. We consider a complete sample of over 200,000
publications from 1950 to 2015 from five major astronomy journals. We determine
the gender of the first author for over 70% of all publications. The fraction
of papers which have a female first author has increased from less than 5% in
the 1960s to about 25% today. We find that the increase of the fraction of
papers authored by females is slowest in the most prestigious journals such as
Science and Nature. Furthermore, female authors write 19$\pm$7% fewer papers in
seven years following their first paper than their male colleagues. At all
times papers with male first authors receive more citations than papers with
female first authors. This difference has been decreasing with time and amounts
to $\sim$6% measured over the last 30 years. To account for the fact that the
properties of female and male first author papers differ intrinsically, we use
a random forest algorithm to control for the non-gender specific properties of
these papers which include seniority of the first author, number of references,
total number of authors, year of publication, publication journal, field of
study and region of the first author's institution. We show that papers
authored by females receive 10.4$\pm$0.9% fewer citations than what would be
expected if the papers with the same non-gender specific properties were
written by the male authors. Finally, we also find that female authors in our
sample tend to self-cite more, but that this effect disappears when controlled
for non-gender specific variables.
