if (FALSE) {
data(fungi)
Y <- fungi$Y
X <- fungi$X
TR <- fungi$TR
C <- fungi$C
dist <- fungi$dist
# cbind is added to treat species-specific random intercept terms
# for when species-specific fixed intercepts are collected to a global intercept
# with beta0com = TRUE as is the case
#model <- gllvm(y = Y, X = cbind(int = 1, X), TR = TR,
# formula = ~DBH.CM + AVERDP + I(AVERDP^2) + CONNECT10 + TEMPR + PRECIP +
# log.AREA + (DBH.CM + AVERDP + I(AVERDP^2) + CONNECT10 + TEMPR + PRECIP +
# log.AREA):(FB.type + Sp.log.vol.µ3 + Lifestyle),
# family = "binomial", num.lv = 0, studyDesign = X[,c("REGION", "RESERVE")],
# colMat = list(C, dist = dist), colMat.rho.struct = "term",
# row.eff = ~(1 | REGION/RESERVE), sd.errors = FALSE,
# randomX = ~int + DBH.CM + AVERDP + I(AVERDP^2) +
# CONNECT10 + TEMPR + PRECIP + log.AREA,
# beta0com = TRUE, nn.colMat = 10, maxit = 20000)
}
Run the code above in your browser using DataLab