Date: 201510
Local time of day: 1801-2400
Location: LGA.Airport, NY
Flight conditions: VMC
Light: Night
Aircraft: Regional Jet 700 ER/LR (CRJ700)
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Climb
Airspace: Class B LGA
ATC / advisory: Tower LGA
Reporter organization: Air Carrier
Reporter function: Captain; Pilot Not Flying
Reporter qualification: Flight Crew Air Transport Pilot (ATP)
Human factors: Distraction; Situational Awareness
Second reporter function: Pilot Flying; First Officer
Anomaly: Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy
Detector: Person Air Traffic Control; Person Flight Crew
When detected: In-flight
Result: Air Traffic Control Issued Advisory / Alert; Air Traffic Control Issued New Clearance; Flight Crew Became Reoriented; Flight Crew Returned To Clearance
Contributing factors: Human Factors
Primary problem: Human Factors

Narrative: We experienced a lateral deviation while departing LGA Runway 13 on the Whitestone Climb. We had just started a four day trip and since I had flown the first leg into LGA; this was the FO's leg as pilot flying. The FO was not familiar with LGA operations so there was a lot to discuss during our quick turn at LGA. Although our time was compressed; we discussed everything as thoroughly as possible at the gate.We pushed back and I taxied slowly so we would have enough time to prepare for everything else that needed to be addressed. Since we hadn't reviewed the complex single engine-out procedure at the gate; it took quite a while to find and brief the procedure on the new EFB but all duties were completed before we reached the runway.On takeoff the FO over-rotated which was alarming and caused a steep nose up attitude and possible tail strike situation. I called for a reduction in pitch and monitored the pitch angle. While my attention was being diverted the FO called for 'NAV mode' and I mistakenly selected 'heading' on the FMS control panel. While the FO was attempting to correct the pitch he called for 'autopilot on'. The autopilot was selected on but the pitch was still so high the trim runaway clacker sounded. I had never heard this warning before with the auto pilot on and this caused further concern.During this time the aircraft remained on the 180 degree heading while climbing 2;500 feet per minute. This was happening while we were trying to get the pitch; v/s; flaps; and now increasing air speed under control. We should have been turning to a 40 degree heading but were still flying 180 degrees. The tower informed us of our mistake and then gave us a north bound vector.There was no known conflict and the rest of the flight was uneventful.Threats were:- The unique operating environment that LGA presents. - The fast pace of operations at LGA.- Multiple complex procedures at LGA.- The lack of the FO's experience and familiarity.- My lack of recent experience flying with a new hire pilot.Errors include:- FMS entry mistake and lack of recognition by myself.- Over rotation on takeoff and lack of experience by the FO.Undesired state:The aircraft remaining on a 180 degree heading instead of turning to 40 degrees.LGA requires that both pilots bring their 'A' game and operate at 100% all of the time. I will have to up my game when operating into LGA. I need to always select the correct modes on the FMS and I must be especially vigilant when flying with an inexperienced FO.The company could possibly prevent this from happening by providing more training or exposure to new hires.


Second narrative: [Report narrative contained no additional information].


Synopsis: CRJ-700 flight crew reported they deviated from cleared departure track out of LGA when they were distracted at a critical time.