The method predict() for classes lm and glm with the argument type="terms" returns a matrix of term components. This matrix is expected to include an attribute 'constant'. However, when the model is fitted with a na.action such as "na.exclude", this attribute is not included. The error is likely to be generated by a call to napredict() within the function predict.lm(). This call re-inserts the missing values of the term matrix, preserving the original dimensionality, but also causes the additional attributes, such as 'constant', to be erased. A simple example: y <- rnorm(10) x <- 1:10 x[3] <- NA m <- lm(y~x) predict(m,type="terms") m1 <- update(m,na.action="na.exclude") predict(m1,type="terms")