I believe the headache might be in the following code from your example. Specifically, when I try to run this code:
pred.df <- as.matrix(data.frame(intercept = 1, regen = regen.pred.vals.scale,
basalArea = 0, basalArea.2 = 0,
percentForest = 0))
X.0 <- array(pred.df, dim = c(nrow(pred.df), 1, ncol(pred.df)))
dimnames(X.0)[[3]] <- c('(Intercept)', 'scale(regen)', 'scale(basalArea)',
'I(scale(basalArea)^2)', 'scale(percentForest)',
'scale(year)')
I get the error message: Error in dimnames(X.0)[[3]] <- c("(Intercept)", "scale(regen)", "scale(basalArea)", :
length of 'dimnames' [3] not equal to array extent.
Perhaps this relates to the random effect?