Learn R Programming

dcce (version 0.4.2)

.absorb_apply: Apply absorb projection to a panel

Description

Demeans the dependent variable, the regressors, and any user-supplied CSA source variables using the given grouping factors. Returns the panel with the affected numeric columns overwritten by their within transforms. Non-numeric columns and columns not listed in the target set are left untouched.

Usage

.absorb_apply(panel, target_vars, groups)

Value

The panel with the target columns demeaned.

Arguments

panel

A panel data.frame from .make_panel().

target_vars

Character vector: column names to be demeaned.

groups

A list of grouping factors from .absorb_resolve().