I was wondering if there is any way to make ri2 play well with high-dimensional fixed effects packages (primarily lfe, but I'm open to using fixest or plm or any other package). Here is my code and the error message outputted.
own_full_nospill <- lfe::felm(own ~ treat | year:race_fac + race_fac:statefip:county + year:statefip:county| 0 | 0, data=full, weights=full$pop)
N_full <- nrow(full)
m_full <- nrow(full[full$treat == 1, ])
declaration <- declare_ra(N=N_full, m = m_full)
And the output is...
ri2_out_2nofactors <- conduct_ri(formula = own_full_nospill$formula,
declaration = declaration,
sharp_hypothesis = 0,
data = full,
assignment = "treat",
outcome = "own")`
`Error in prep_data(data = data, se_type = se_type, clustered = clustered, :
dims [product 4] do not match the length of object [30496]
In addition: Warning messages:
1: In Ops.factor(year:race_fac, race_fac:statefip:county) :
‘+’ not meaningful for factors
2: In Ops.factor(year:race_fac + race_fac:statefip:county, year:statefip:county) :
‘+’ not meaningful for factors
I was wondering if there is any way to make ri2 play well with high-dimensional fixed effects packages (primarily lfe, but I'm open to using fixest or plm or any other package). Here is my code and the error message outputted.
own_full_nospill <- lfe::felm(own ~ treat | year:race_fac + race_fac:statefip:county + year:statefip:county| 0 | 0, data=full, weights=full$pop)N_full <- nrow(full)m_full <- nrow(full[full$treat == 1, ])declaration <- declare_ra(N=N_full, m = m_full)