x <- as.factor(c(1:5,1:5,1:5));x
usc(x)
## how to use the theta and thetaC arguments:
# data(DT_example)
# DT <- DT_example
# theta <- matrix(9:1,3,3);
# theta[lower.tri(theta)] <- t(theta)[lower.tri(theta)]
# theta # initial VCs
# thetaC <- fixm(3); thetaC # fixed VCs
# ans1 <- mmec(Yield~Env,
# random= ~ vsc( usc(Env,theta = theta,thetaC = thetaC),isc(Name) ),
# rcov= ~ units, nIters = 1,
# data=DT)
# summary(ans1)$varcomp
Run the code above in your browser using DataLab