insight (version 0.11.0)

get_weights: Get the values from model weights

Description

Returns weighting variable of a model.

Usage

get_weights(x, na_rm = FALSE, ...)

Arguments

x

A fitted model.

na_rm

Logical, if TRUE, removes possible missing values.

...

Currently not used.

Value

The weighting variable, or NULL if no weights were specified (or if all weights were 1).

Examples

Run this code
# 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