R code for trypanosomiasis analysis