powered by
Grab a matrix of fixed effects from a model object
grab_design_matrix(data, rhs_formula, ...)
a model.matrix
model.matrix
the data from which to extract the matrix
the right hand side of a model formula
Can be used to pass xlev to model.frame
xlev
model.frame
# Create a "desigm" matrix for the first ten rows of iris data fit <- lm(Sepal.Width ~ Petal.Width, data = iris) grab_design_matrix( data = iris[1:10, ], grab_fixed_formula(fit))
Run the code above in your browser using DataLab