smmargins.MarginsResult

class smmargins.MarginsResult(estimate: ndarray, vcov: ndarray, labels: Sequence[str] | None = None, level: float = 0.95, df: int | None = None, stat_name: str = 'margin', outcome_labels: Sequence[str] | None = None, outcome_index: ndarray | None = None)

Container for marginal effects or adjusted predictions.

This class holds the point estimates, their delta-method covariance matrix, and provides methods for summarizing results, computing linear contrasts, or subsetting multi-outcome results.

estimate

Point estimates for each margin.

Type:

ndarray

vcov

The estimated covariance matrix of the margins (delta method).

Type:

ndarray

se

Standard errors (square root of the diagonal of vcov).

Type:

ndarray

tvalues

Test statistics (estimate / se).

Type:

ndarray

pvalues

Two-sided p-values based on either the normal or t distribution.

Type:

ndarray

labels

Labels for each row of the results.

Type:

list of str

__init__(estimate: ndarray, vcov: ndarray, labels: Sequence[str] | None = None, level: float = 0.95, df: int | None = None, stat_name: str = 'margin', outcome_labels: Sequence[str] | None = None, outcome_index: ndarray | None = None)

Methods

__init__(estimate, vcov[, labels, level, ...])

contrast(c[, labels, name])

Compute linear contrasts of the estimates.

outcome(k)

Slice rows belonging to the specified outcome class(es).

summary()

A summary table of the results.

Attributes

ci_lower

ci_upper

pvalues

se

tvalues