A prospective study was carried out on 92 randomly selected beef herds in the Midi-Pyrenees region in France. The objective was to determine factors associated with time to neonatal gastroenteritis. By taking into account the "intra-herd" correlation in failure time (in the semiparametric Cox model), we identified 12 management risk factors associated with hazard of diarrhoea. Some previously have been identified, but "new" risk factors were feeding of corn silage and the incidence of diarrhoea in the last season. We used the two main approaches which are often reviewed: marginal and frailty Cox models. Our results show that these two models give different parameter estimates, so the choice of the model remains crucial.