Extract design matrix from data.frame and formula
Usage
design(
formula,
data,
...,
intercept = FALSE,
response = FALSE,
rm_envir = FALSE,
specials = NULL,
specials.call = NULL,
xlev = NULL,
design.matrix = TRUE
)Arguments
- formula
formula
- data
data.frame
- ...
additional arguments (e.g, specials such weights, offsets, ...)
- intercept
(logical) If FALSE an intercept is not included in the design matrix
- response
(logical) if FALSE the response variable is dropped
- rm_envir
Remove environment
- specials
character vector specifying functions in the formula that should be marked as special in the terms object
- specials.call
(call) specials optionally defined as a call-type
- xlev
a named list of character vectors giving the full set of levels to be assumed for each factor
- design.matrix
(logical) if FALSE then only response and specials are returned. Otherwise, the design.matrix
xis als part of the returned object.
