ASR006. One-way classification LMM - Railways rails

The complete script for this example can be downloaded here:

Dataset

In this example we will use the D004 dataset, and the first few rows are presented below:

rail travel
1 55
1 53
1 54
2 26
2 37
2 32


Model

The one-way classification LMM that we will fit is:

\[ y = \mu + rail + e\ \] where,

    \(y\) is the time for ultrasonic wave to travel the length of the rail,

    \(\mu\) is the overall mean,

    \(rail\) is the random effect of rail, with \(rail \sim \mathcal{N}(0,\,\sigma^{2}_{r})\),

    \(e\) is the random residual effect, with \(e \sim \mathcal{N}(0,\,\sigma^{2}_{e})\).


Now, let’s take a look at how to write the model with ASReml-R. Note that before fitting the model rail needs to be set as factor.

asr006 <- asreml(
  fixed = travel ~ 1,
  random = ~rail,
  residual = ~units,
  data = d004
)


Exploring output

The variance components estimated from this model are:

summary(asr006)$varcomp
        component  std.error  z.ratio bound %ch
rail    615.73937 391.581893 1.572441     P 0.2
units!R  16.17798   6.606945 2.448633     P 0.0

Where the is a large component associated with rail, indicating that this is a relevant source of variability.


The random effects (BLUPs) are:

BLUP <- summary(asr006, coef = TRUE)$coef.random
BLUP
        solution std.error   z.ratio
rail_1 -12.39122  10.33599 -1.198842
rail_2 -34.53019  10.33599 -3.340774
rail_3  18.00857  10.33599  1.742317
rail_4  29.24327  10.33599  2.829268
rail_5 -16.35641  10.33599 -1.582472
rail_6  16.02597  10.33599  1.550503