Variance components of the covariance function coefficients in a random reg
ression test-day model were estimated by Legendre polynomials up to a fifth
order for first-parity records of Dutch dairy cows using Gibbs sampling. T
wo Legendre polynomials of equal order were used to model the random part o
f the lactation curve, one for the genetic component and one for permanent
environment. Test-day records from cows registered between 1990 to 1996 and
collected by regular milk recording were available. For the data set, 23,7
00 complete lactations were selected from 475 herds sired by 262 sires.
Because the application of a random regression model is limited by computin
g capacity, we investigated the minimum order needed to fit the variance st
ructure in the data sufficiently. Predictions of genetic and permanent envi
ronmental variance structures were compared with bivariate estimates on 30-
d intervals. A third-order or higher polynomial modeled the shape of varian
ce curves over DIM with sufficient accuracy for the genetic and permanent e
nvironment part. Also, the genetic correlation structure was fitted with su
fficient accuracy by a third-order polynomial, but, for the permanent envir
onmental component, a fourth order was needed. Because equal orders are sug
gested in the literature, a fourth-order Legendre polynomial is recommended
in this study. However, a rank of three for the genetic covariance matrix
and of four for permanent environment allows a simpler covariance function
with a reduced number of parameters based on the eigenvalues and eigenvecto
rs.