Closed andrewjmc closed 3 years ago
test_weights_two_arm <- weightit(formula = f, data=sd_subset_two_arm, method="cbps", estimand="ATE", missing="ind" ) summary(test_weights_two_arm) Summary of weights - Weight ranges: Error in rep(" ", spaces1) : invalid 'times' argument In addition: Warning messages: 1: In min(w[w > 0 & t == 1]) : no non-missing arguments to min; returning Inf 2: In max(w[w > 0 & t == 1]) : no non-missing arguments to max; returning -Inf 3: In min(w[w > 0 & t == 0]) : no non-missing arguments to min; returning Inf 4: In max(w[w > 0 & t == 0]) : no non-missing arguments to max; returning -Inf
Weights are reasonable (1-6.8)
The error comes deep into the print.summary function, and I cannot play with trace(..., edit=TRUE) to work out why it's going wrong!
trace(..., edit=TRUE)
Solved -- exposure category was character not factor (interestingly doesn't cause an issue for multinomial treatments).
Weights are reasonable (1-6.8)
The error comes deep into the print.summary function, and I cannot play with
trace(..., edit=TRUE)
to work out why it's going wrong!