所以我的示例数据如下所示:
library(dplyr)
library(plm)
library(car)
library(margins)
test <- structure(list(period = c(1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4,
5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10,
10, 1, 2, 2, 2, 3, 3, 3, 3, 5, 6, 6, 7, 7, 7, 7, 8, 8), indicator = c(0L,
0L, 0L, 0L, 0L,