Partial least squares for dependent data