  The James Webb Space Telescope (JWST) has now started its exploration of
exoplanetary worlds. In particular, the Mid-InfraRed Instrument (MIRI) with its
Low-Resolution Spectrometer (LRS) carries out transit, eclipse, and phase-curve
spectroscopy of exoplanetary atmospheres with unprecedented precision in a so
far almost uncharted wavelength range. The precision and significance in the
detection of molecules in exoplanetary atmospheres rely on a thorough
understanding of the instrument itself and accurate data reduction methods.
This paper aims to provide a clear description of the instrumental systematics
that affect observations of transiting exoplanets through the use of
simulations. We carried out realistic simulations of transiting-exoplanet
observations with the MIRI LRS instrument that included the model of the
exoplanet system, the optical path of the telescope, the MIRI detector
performances, and instrumental systematics and drifts that could alter the
atmospheric features we are meant to detect in the data. After introducing our
pipeline, we show its performance on the transit of L168-9b, a
super-Earth-sized exoplanet observed during the commissioning of the MIRI
instrument. This paper provides a better understanding of the data themselves
and of the best practices in terms of reduction and analysis through
comparisons between simulations and real data. We show that simulations
validate the current data-analysis methods. Simulations also highlight
instrumental effects that impact the accuracy of our current spectral
extraction techniques. These simulations are proven to be essential in the
preparation of JWST observation programs and help us assess the detectability
of various atmospheric and surface scenarios.
