If the original data contains the treatment variable stored as double instead of integer, panel.matrices will return multiple warnings: Warning in FUN(newX[, i], ...): coercing argument of type 'double' to logical.
Solution is simply to cast as integer, but maybe this could be done internally, or have an explicit message?
Thanks!
library(synthdid)
data('california_prop99')
setup = panel.matrices(california_prop99)
california_prop99$treated <- as.double(california_prop99$treated)
setup = panel.matrices(california_prop99)
#> Warning in FUN(newX[, i], ...): coercing argument of type 'double' to logical
If the original data contains the treatment variable stored as double instead of integer,
panel.matrices
will return multiple warnings: Warning in FUN(newX[, i], ...): coercing argument of type 'double' to logical.Solution is simply to cast as integer, but maybe this could be done internally, or have an explicit message?
Thanks!