count model ```r # interaction > m <- feglm(t1 ~ conditionC * t0LC | block, dt1, family = "quasipoisson") NOTE: 789 fixed-effects (4,395 observations) removed because of only 0 outcomes. > m GLM estimation, family = quasipoisson, Dep. Var.: t1 Observations: 76,895 Fixed-effects: block: 12,818 Standard-errors: Clustered (block) Estimate Std. Error t value Pr(>|t|) conditionC 0.037179 0.016167 2.29969 0.0214819 * t0LC 0.657679 0.010865 60.53103 < 2.2e-16 *** conditionC:t0LC -0.024614 0.007704 -3.19475 0.0014029 ** # no interaction > m_nointeract GLM estimation, family = quasipoisson, Dep. Var.: t1 Observations: 76,895 Fixed-effects: block: 12,818 Standard-errors: Clustered (block) Estimate Std. Error t value Pr(>|t|) conditionC -0.002673 0.010985 -0.243313 0.80777 t0LC 0.657591 0.010877 60.459695 < 2.2e-16 *** # wald test compare two models Name | Model | df | df_diff | F | p -------------------------------------------------------- m_nointeract | fixest | 76893 | | | m | fixest | 76892 | 1.00 | 32.37 | < .001 # two-bin analysis > dt1[, .(t0 = mean(t0), n = .N), keyby = .(bin = t0_bin)] bin t0 n 1: _1 0.2557172 43728 2: _2 14.2756243 37562 # low pre-treatment count (0) > feglm(t1 ~ condition * t0_bin | block, dt1, family = "quasipoisson") NOTE: 789 fixed-effects (4,395 observations) removed because of only 0 outcomes. GLM estimation, family = quasipoisson, Dep. Var.: t1 Observations: 76,895 Fixed-effects: block: 12,818 Standard-errors: Clustered (block) Estimate Std. Error t value Pr(>|t|) conditiont 0.078555 0.033525 2.34319 0.019135 * # t0_bin_2 1.441641 0.029886 48.23865 < 2.2e-16 *** conditiont:t0_bin_2 -0.090435 0.036651 -2.46745 0.013621 * # high pre-treatment count (1) > feglm(t1 ~ condition * t0_bin | block, dt1, family = "quasipoisson") NOTE: 789 fixed-effects (4,395 observations) removed because of only 0 outcomes. GLM estimation, family = quasipoisson, Dep. Var.: t1 Observations: 76,895 Fixed-effects: block: 12,818 Standard-errors: Clustered (block) Estimate Std. Error t value Pr(>|t|) conditiont -0.011880 0.013607 -0.873101 0.382625 # t0_bin_1 -1.441641 0.029886 -48.238650 < 2.2e-16 *** conditiont:t0_bin_1 0.090435 0.036651 2.467449 0.013621 * ``` ![[s20220513_114544.png]]