Skip to contents

This function decomposes the change in means between consecutive time periods into three components: composition effects (changing group shares), within-group change (groups shifting their outcomes), and an interaction effect (covariance of share and outcome changes).

Usage

decomp(data, tname, gname, yname, sname, tol = 1e-10)

Arguments

data

A data frame containing group-level summary statistics.

tname

The column name for the time variable.

gname

The column name for the group variable.

yname

The column name for the group mean of the outcome.

sname

The column name for the group's population share at each time period, where shares should sum to 1 within each period.

tol

The tolerance for the accounting identity check.

Value

A data frame.