Rate of gain and feed efficiency are important traits in most breeding programs for growing farm animals. Rate of gain (GAIN) is usually expressed over a certain age period and feed efficiency is often expressed as residual feed intake (RFI), defined as observed feed intake (FI) minus expected feed intake based on live weight (WGT) and GAIN. However, the basic traits recorded are always WGT and FI and other traits are derived from these basic records. The aim of this study was to develop a procedure for simultaneous analysis of the basic records and then derive linear traits related to feed efficiency without retorting to any approximations. A bivariate longitudinal random regression model was employed on 13,791 individual longitudinal records of WGT and FI from 2,827 bulls of six different beef breeds tested for own performance in the period from 7 to 13 months of age. Genetic and permanent environmental covariance functions for curves of WGT and FI were estimated using Gibbs sampling. Genetic and permanent covariance functions for curves of GAIN were estimated from the first derivative of the function for WGT and finally the covariance functions were extended to curves for RFI, based on the conditional distribution of FI given WGT and GAIN. Furthermore, the covariance functions were extended to include GAIN and RFI defined over different periods of the performance test. These periods included the whole test period as normally used when predicting breeding values for GAIN and RFI for beef bulls. Based on the presented method, breeding values and genetic parameters for derived traits such as GAIN and RFI defined longitudinally or integrated over (parts of) of the test period can be obtained from a joint analysis of the basic records. The resulting covariance functions for WGT, FI, GAIN and RFI are usually singular but the method presented here do not suffer from the estimation problems associated with defining these traits individually before the genetic analysis. All results are thus estimated simultaneously, and the set of parameters are consistent.