controlExtractor {speccurvieR}R Documentation

Extracts the control variable names and coefficients from an lm model summary.

Description

Extracts the control variable names and coefficients from a model summary.

Usage

controlExtractor(model, x, feols_model = F)

Arguments

model

A model summary object.

x

A string containing the independent variable name.

feols_model

An indicator for whether 'model' is a 'fixest::feols()' model. Defaults to 'FALSE'.

Value

A dataframe with two columns, 'term' contains the name of the control and 'coef' contains the coefficient estimate.

Examples

m <- summary(lm(Salnty ~ STheta + T_degC, bottles))
controlExtractor(model = m, x = "STheta");

m <- summary(lm(Salnty ~ STheta*T_degC + O2Sat, bottles))
controlExtractor(model = m, x = "STheta");

[Package speccurvieR version 0.3.0 Index]