fitted.mmer | R Documentation |
fitted
method for class "mmer"
.
## S3 method for class 'mmer'
fitted(object, ...)
object |
an object of class |
... |
Further arguments to be passed to the mmer function |
vector of fitted values of the form y.hat = Xb + Zu including all terms of the model.
Giovanny Covarrubias
fitted
, mmer
# data(DT_cpdata)
# DT <- DT_cpdata
# GT <- GT_cpdata
# MP <- MP_cpdata
# #### create the variance-covariance matrix
# A <- A.mat(GT) # additive relationship matrix
# #### look at the data and fit the model
# head(DT)
# mix1 <- mmer(Yield~1,
# random=~vsr(id,Gu=A)
# + Rowf + Colf + spl2Da(Row,Col),
# rcov=~units,
# data=DT)
#
# ff=fitted(mix1)
#
# colfunc <- colorRampPalette(c("steelblue4","springgreen","yellow"))
# lattice::wireframe(`u:Row.fitted`~Row*Col, data=ff$dataWithFitted,
# aspect=c(61/87,0.4), drape=TRUE,# col.regions = colfunc,
# light.source=c(10,0,10))
# lattice::levelplot(`u:Row.fitted`~Row*Col, data=ff$dataWithFitted, col.regions = colfunc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.