As reported to the FAA. Reports are unverified, and codes are left as the FAA publishes them.
What was found
THE LANDING GEAR WOULD NOT RETRACT AFTER TAKEOFF FROM LGA. QRH PROCEDURES WERE COMPLIED WITH AND THE AIRCRAFT WAS DIVERTED TO EWR WHERE IT LANDED WITHOUT INCIDENT. MAINTENANCE FOUND THE M991 AIR SENSING SQUAT SWITCH AT FAULT. THE SWITCH WAS REMOVED AND REPLACED AND OPERATIONAL CHECKS WERE GOOD.