Healthcare-associated infection and antimicrobial resistance are major concerns. However, the extent to which antibiotic exposure affects transmission and detection of infections such as MRSA is unclear. Additionally, temporal trends are typically reported in terms of changes in incidence, rather than analysing underling transmission processes. We present a data-augmented Markov chain Monte Carlo approach for inferring changing transmission parameters over time, screening test sensitivity, and the effect of antibiotics on detection and transmission. We expand a basic model to allow use of typing information when inferring sources of infections. Using simulated data, we show that the algorithms are accurate, well-calibrated and able to identify antibiotic effects in sufficiently large datasets. We apply the models to study MRSA transmission in an intensive care unit in Oxford, UK with 7924 admissions over 10 years. We find that falls in MRSA incidence over time were associated with decreases in both the number of patients admitted to the ICU colonised with MRSA and in transmission rates. In our inference model, the data were not informative about the effect of antibiotics on risk of transmission or acquisition of MRSA, a consequence of the limited number of possible transmission events in the data. Our approach has potential to be applied to a range of healthcare-associated infections and settings and could be applied to study the impact of other potential risk factors for transmission. Evidence generated could be used to direct infection control interventions.