# NOT RUN {
## Term names from Shipley SEM
m <- Shipley.SEM
xNam(m)
xNam(m, intercept = FALSE) # only predictors
## Model with different types of predictor (some multi-coefficient terms)
x1 <- poly(rnorm(100), 2) # polynomial
x2 <- as.factor(rep(c("a", "b", "c", "d"), each = 25)) # categorical
x3 <- rep(1, 100) # no variation
m <- lm(rnorm(100) ~ x1 + x2 + x3)
xNam(m)
xNam(m, aliased = FALSE) # drop term that cannot be estimated (x3)
xNam(m, aliased = FALSE, list = TRUE) # as named list
# }
Run the code above in your browser using DataLab