Skip to contents

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)