Returns weighting variable of a model.
get_weights(x, na_rm = FALSE, ...)
A fitted model.
Logical, if TRUE, removes possible missing values.
TRUE
Currently not used.
The weighting variable, or NULL if no weights were specified (or if all weights were 1).
NULL
# NOT RUN { data(mtcars) mtcars$weight <- rnorm(nrow(mtcars), 1, .3) m <- lm(mpg ~ wt + cyl + vs, data = mtcars, weights = weight) get_weights(m) # }
Run the code above in your browser using DataLab