Finish translating an R code to Fortran -- 2

Job ID: 33073583

Budget: $30 – $250 USD

I have majority of the code translated from R to Python. I need to finish it.

Tasks:
1. Finish the code
2. Make sure it runs correctly (I will provide test codes and data)