We propose a functional random effect time-varying coefficient model to establish the dynamic relationship between the response and predictor variables in longitudinal data. This model allows us not only to interpret time-varying covariate effects, but also to depict random effects via time-varying profiles that are characterized by functional principal components. We develop the functional profiling-backfitting method to estimate model components, which includes the profiling and backfitting procedures via a set of least squares type estimating equations. Asymptotic properties of the resulting estimator are obtained. Furthermore, we investigate the finite sample performance of the proposed method through simulation studies and present an application to primary biliary cirrhosis data. Copyright © 2012 John Wiley & Sons, Ltd.