insight (version 0.11.0)

find_weights: Find names of model weights

Description

Returns the name of the variable that describes the weights of a model.

Usage

find_weights(x, ...)

Arguments

x

A fitted model.

...

Currently not used.

Value

The name of the weighting variable as character vector, or NULL if no weights were specified.

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)
find_weights(m)
# }

Run the code above in your browser using DataLab