powered by
All factor levels included
Model_Matrix( formula, data = NULL, mf = model.frame(formula, data = data), allFactor = TRUE, sparse = FALSE )
formula
data frame
model frame (alternative input instead of data)
When TRUE all variables are coerced to factor
When TRUE sparse matrix created by sparse.model.matrix()
model matrix created via model.matrix() or sparse.model.matrix()
# NOT RUN { z <- SSBtoolsData("sprt_emp_withEU") Model_Matrix(~age*year + geo, z) # }
Run the code above in your browser using DataLab