Open anzonyquispe opened 1 month ago
This is my original specification
out <- att_gt(yname = "per_treecover", gname = "min_year", idname = "block_id", tname = "year", xformla = ~ 1 , data = df2, control_group = c( "notyettreated" ), base_period = 'universal', alp = 0.05, clustervars = 'block_id' )
I would like to add linear trends since I see quadratic forms before treatment application
I added the linear trends using these lines of code
df2$trend = df2$year - min(df2$year) + 1 df2$state_factor = as.factor(df2$pc11_s_id) df2$trend_fac = as.factor(df2$trend) df2$block_id_fac = as.factor(df2$block_id) out <- att_gt(yname = "per_treecover", gname = "min_year", idname = "block_id", tname = "year", xformla = ~ trend * block_id_fac , data = df2, control_group = c( "notyettreated" ), base_period = 'universal', alp = 0.05, clustervars = 'block_id' )
I am not sure fi we can add linear trends like this. I tried with a small dataset, it seems that it does not work, is any other way to add linear trends to the specification?
This is my original specification
I would like to add linear trends since I see quadratic forms before treatment application![image](https://github.com/bcallaway11/did/assets/69997588/48db62f8-bf58-438d-8fa0-0bf36f81c082)
I added the linear trends using these lines of code
I am not sure fi we can add linear trends like this. I tried with a small dataset, it seems that it does not work, is any other way to add linear trends to the specification?