####=========================================####
#### For CRAN time limitations most lines in the
#### examples are silenced with one '#' mark,
#### remove them and run the examples
####=========================================####
data(DT_technow)
DT <- DT_technow
Md <- Md_technow
M <- tcrossprod(Md)
xx = with(DT, redmm(x=dent, M=M, nPC=10, returnLam=TRUE))
# ans <- mmes(GY~1,
# # new model matrix instead of dent
# random=~vsm(ism(xx$Z)),
# rcov=~units,
# data=DT)
# summary(ans)$varcomp
# u = xx$Lam * ans$uList[[1]] # change * for matrix product
Run the code above in your browser using DataLab