R codes for study statistics