####=========================================####
#### 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))
# ans <- mmec(GY~1,
# # new model matrix instead of dent
# random=~vsc(isc(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