data(miscEx)
vv<- v
vv[3]<- vv[4]<- vv[5] <- list(NULL)
# forward selection
# any variance component will be selected
# if AIC improve by 1e-5 or larger
o<- aicVC(y,x,k=0,v=vv)
o
# forward selection
of<- aicVC(y, x, v=vv, k=1/2, init=6, direction="for",
verbose=TRUE)
of
# backward elimination
ob<- aicVC(y, x, v=vv, k=1/2, keep=6, direction="back",
verbose=TRUE)
ob
Run the code above in your browser using DataLab