effCoef: Function to get coefficient estimates from regression models...

View source: R/Effect.R

effCoefR Documentation

Function to get coefficient estimates from regression models for use in the effects package.

Description

This function uses the get_parameters function in the insight package to get a vector of regression coefficients for use in the effects package. It converts the two-column data.frame returned by get_parameters to a vector of named elements.

Usage


effCoef(mod, ...)

## Default S3 method:
effCoef(mod, ...)

Arguments

mod

A model object with a linear predictor representing fixed effects.

...

Additional parameter passed to get_parameters.

Details

The get_parameters function can be used to retrieve the coefficient estimates corresponding to a linear predictor for many regression models, and return them as a two column data.frame, with regressor names in the first column and estimates in the second column. This function converts this output to a named vector as is expected by the effects package.

Value

A vector of coefficient estimates

Author(s)

Sanford Weisberg sandy@umn.edu

See Also

get_parameters, and vignette Regression Models Supported by the effects Package

Examples

m1 <- lm(prestige ~ type + income + education, Duncan)
effCoef(m1)

effects documentation built on July 13, 2022, 5:06 p.m.