View source: R/compute_efficient_estimator_and_se.R
compute_g_level_summaries | R Documentation |
This function computes the mean-vector and covariance matrix of the outcomes for each cohort, where a cohort g is a group of units first treated in period g
compute_g_level_summaries(df, is_balanced = TRUE)
df |
A data table containing panel data with the variables y (an outcome), i (an individual identifier), t (the period in which the outcome is observe), g (the period in which i is first treated, with Inf denoting never treated) |
is_balanced |
If true, the df has previously been balanced so this does not need to be done internally. |
Y_bar_list A list of the means of the outcomes for each cohort g
S_g_list A list of covariance matrices for the outcomes for each cohort g
N_g_DT A data table of the number of observations for each cohort g
g_list A list of when the cohorts were first treated
t_list A list of the the time periods for the outcome. The vector of outcomes corresponds with this order.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.