panelMatrices: Convert a long panel to wide matrix (cleaner data.table...

View source: R/regUtils.R

panelMatricesR Documentation

Convert a long panel to wide matrix (cleaner data.table version)

Description

Convert a long panel to wide matrix (cleaner data.table version)

Usage

panelMatrices(dt, unit_id, time_id, treat, outcome)

Arguments

dt

data.table in long panel format

unit_id

unit id name

time_id

time id name

treat

treatement name

outcome

outcome name

Value

list with treatment matrix W, outcome matrix Y, N0 (number of control units), and T0 (number of untreated periods)


apoorvalal/LalRUtils documentation built on Sept. 22, 2023, 5:53 p.m.