Implementing GLMs with APG for TIme Series