Extract components from marginaleffects objects

Description

Extract components from marginaleffects objects

Usage

## S3 method for class 'marginaleffects'
components(object, component = NULL, ...)

Arguments

object A marginaleffects object (predictions, comparisons, slopes, or hypotheses)
component Character string specifying which component to extract. Must be a valid slot name from the internal S4 object. If NULL (the default), components() prints a message with all available component names. Common components include: "model", "newdata", "modeldata", "call", "jacobian", "vcov_model", "type", "by", "comparison", "variables", etc.
Ignored.

Details

This function provides access to the internal components stored in the mfx attribute of marginaleffects objects. The mfx attribute contains an S4 object of class "marginaleffects_internal" with various slots containing model information, data, and computational details used by the marginaleffects functions.

Warning: the internal slot names are not considered part of the public API and may change without warning in future versions of the marginaleffects package.

Value

The requested component from the mfx object