I have an unbalanced panel of student data, where students are nested within teachers and teachers are nested within schools. The treatment (a teacher profesional development program) is at the teacher level and we have 3 cohorts of teachers and 5 years of data (2 pre-treatment years). Can I use did with this type of data and treatment?
I was able to run the code and get results with allow_unbalanced_panel = FALSE. If I set it to TRUE I get the following error:
Error in aggregate.data.frame(as.data.frame(x), ...) :
arguments must have same length
And, when I try to cluster by school I get this error:
Error in mboot(inffunc, DIDparams = dp) :
can't handle time-varying cluster variables
In addition: Warning message:
In pre_process_did(yname = yname, tname = tname, idname = idname, :
Dropped 23049 observations while converting to balanced panel.
I have an unbalanced panel of student data, where students are nested within teachers and teachers are nested within schools. The treatment (a teacher profesional development program) is at the teacher level and we have 3 cohorts of teachers and 5 years of data (2 pre-treatment years). Can I use did with this type of data and treatment?
I was able to run the code and get results with allow_unbalanced_panel = FALSE. If I set it to TRUE I get the following error:
Error in aggregate.data.frame(as.data.frame(x), ...) : arguments must have same length
And, when I try to cluster by school I get this error:
Error in mboot(inffunc, DIDparams = dp) : can't handle time-varying cluster variables In addition: Warning message: In pre_process_did(yname = yname, tname = tname, idname = idname, : Dropped 23049 observations while converting to balanced panel.
Thanks!