In designed experiments and in particular longitudinal studies, the aim may
be to assess the effect of a quantitative variable such as time on treatme
nt effects. Modelling treatment effects can be complex in the presence of o
ther sources of variation. Three examples are presented to illustrate an ap
proach to analysis in such cases. The first example is a longitudinal exper
iment on the growth of cows under a factorial treatment structure where ser
ial correlation and variance heterogeneity complicate the analysis. The sec
ond example involves the calibration of optical density and the concentrati
on of a protein DNase in the presence of sampling variation and variance he
terogeneity. The final example is a multienvironment agricultural field exp
eriment in which a yield-seeding rate relationship is required for several
varieties of lupins. Spatial variation within environments, heterogeneity b
etween environments and variation between varieties all need to be incorpor
ated in the analysis. In this paper, the cubic smoothing spline is used in
conjunction with fixed and random effects, random coefficients and variance
modelling to provide simultaneous modelling of trends and covariance struc
ture. The key result that allows coherent and flexible empirical model buil
ding in complex situations is the linear mixed model representation of the
cubic smoothing spline. An extension is proposed in which trend is partitio
ned into smooth and nonsmooth components. Estimation and inference, the ana
lysis of the three examples and a discussion of extensions and unresolved i
ssues are also presented.