public function seedUnits($batches, $allStudents, $collegeid)
 {
     foreach ($batches as $batch) {
         $students = $allStudents[$batch];
         $totalUnderload = 0;
         $totalNodata = 0;
         foreach ($students as $student) {
             $units = Assessment::getOneAveUnitsCollege($student->studentid, $collegeid);
             if ($units === -1) {
                 $totalNodata++;
             } else {
                 if ($units < 15) {
                     $totalUnderload++;
                 } else {
                 }
             }
         }
         $newCorrelation = new Correlation();
         $newCorrelation->factorid = 6;
         $newCorrelation->batch = $batch;
         $countStudents = count($students);
         if ($countStudents - $totalNodata > 0) {
             $newCorrelation->ratio = $totalUnderload / ($countStudents - $totalNodata);
         } else {
             $newCorrelation->ratio = 0;
         }
         $newCorrelation->unittype = 'college';
         $newCorrelation->collegeid = $collegeid;
         $newCorrelation->save();
     }
 }