This function allows to produce predictions specifying those variables that define the margins of the hypertable to be predicted (argument D). Predictions are obtained for each combination of values of the specified variables that is present in the data set used to fit the model. See vignettes for more details.
For predicted values the pertinent design matrices X and Z together with BLUEs (b) and BLUPs (u) are multiplied and added together.
predicted.value equal Xb + Zu.1 + ... + Zu.n
For computing standard errors for predictions the parts of the coefficient matrix:
C11 equal (X.t() V.inv() X).inv()
C12 equal 0 - [(X.t() V.inv() X).inv() X.t() V.inv() G Z]
C22 equal PEV equal G - [Z.t() G[V.inv() - (V.inv() X X.t() V.inv() X V.inv() X)]G Z.t()]
In practive C equals ( W.t() V.inv() W ).inv()
when both fixed and random effects are present in the inclusion set. If only fixed and random effects are included, only the respective terms from the SE for fixed or random effects are calculated.