-
Notifications
You must be signed in to change notification settings - Fork 3
Using weights #5
Description
Hi, I have been trying to using the weights option with no success. I get the following error
Error in wfe(y ~ tr + x1+x 2 + :
'C.it' must be a numeric vector with length equal to number of observations
Basically what I did was to rename my weight variable as C.it in the main dataset. Also I tried defining another dataset named C.it that includes this variable only. My weights are integers: basically the number of observations that correspond to the averages I am using at the unit by time level. I also tried defining these weights as proportions (the ration of this number and the total number of observations). Do you have an example of how to work with weights? Or could you please indicate me how can I incorporate them?
Another thing I realized is that even without weights I need to convert all columns into integers (except for time and year which I set up as factors) for the code to work, else I get the following error:
Error in $<-.data.frame(*tmp*, "W.it", value = numeric(0)) :
replacement has 0 rows, data has 17122
Thank you very much,