Predictions are made based on the fitted model in the varComp object. These predictions can be at genotype level, at genotype x trial level or at the level of genotype x nestingFactor. If the model was fitted with trial as year x location then genotype x trial level becomes genotype x year x location.
## S3 method for class 'varComp'predict(object,..., predictLevel ="genotype")
Arguments
object: An object of class varComp.
...: Not used.
predictLevel: A character string, the level at which prediction should be made. Either "genotype" for prediction at genotype level, "trial" for predictions at genotype x trial level, the variable used as nesting factor for predictions at the level of genotype x nestingFactor level, or one or more of the extra terms used in the model. E.g. c("region", "year") for a model fitted with regionLocationYear = TRUE.
Returns
A data.frame with predictions.
Examples
## Fit a mixed model.geVarComp <- gxeVarComp(TD = TDMaize, trait ="yld")## Predictions at genotype level.predGeno <- predict(geVarComp)head(predGeno)## Predictions at genotype x trial level.predGenoTrial <- predict(geVarComp, predictLevel ="trial")head(predGenoTrial)
See Also
Other Mixed model analysis: CRDR(), correlations(), diagnostics(), gxeVarComp(), herit(), plot.varComp(), vc()