Learn R Programming

sjstats (version 0.10.2)

pred_vars: Get predictor and response variables from models

Description

pred_vars() and resp_var() return the names of a model's predictor or response variables as character vector.

resp_val() returns the values of the model's response vector.

Usage

pred_vars(x)

resp_var(x)

resp_val(x)

Arguments

x

A fitted model.

Value

The name(s) of the response or predictor variables from x as character vector; or the values from x's response vector.

Examples

Run this code
# NOT RUN {
data(efc)
fit <- lm(neg_c_7 ~ e42dep + c161sex, data = efc)

pred_vars(fit)
resp_var(fit)

resp_val(fit)

# }

Run the code above in your browser using DataLab