I cannot reproduce data for privacy reason. I am just curious if anyone has encountered the same problem since it might be internal error in PanelMatch package itself.
I have time.id, unit.id and treatment all integers; all the covariates and outcome variable are of numeric class. Still, when I run PanelMatch function I get this error:
Warning: non-numeric data exists. Only numeric (including binary) data can be used for refinement and calculationsError in perform_refinement(lag = lag, time.id = time.id, unit.id = unit.id, : no viable treated units for att specification
I know you can't reproduce the error, I'm just curious if anyone has encountered the same error while the variables are as they should be and what might be the reason for the error? Even though the treatmetn and control groups are unbalanced, in absolute terms, there are more than enough observations in both groups.
I have converted all the variables into integer and numeric variables, but the problem persists.
The problem seems to be the unit.id variable. It was an integer variable but there were skips between the values (1, 3, 5, 8...). It had to be consecutive integers without omitting values (1,2,3,4,5...). In the end, I used match() function from dplyr to create a new unit.id variable with consecutive integers. Hope this helps someone.