Learn R Programming

tidylearn (version 0.1.0)

tl_interaction_effects: Calculate partial effects based on a model with interactions

Description

Calculate partial effects based on a model with interactions

Usage

tl_interaction_effects(model, var, by_var, at_values = NULL, intervals = TRUE)

Value

A data frame with marginal effects

Arguments

model

A tidylearn model object

var

Variable to calculate effects for

by_var

Variable to calculate effects by (interaction variable)

at_values

Named list of values at which to hold other variables

intervals

Logical; whether to include confidence intervals