I just installed WeightIt and am getting an error; minimal example code provided below. What's going wrong?
t1 <- data.frame(treat=c(rep(0, 500), rep(1, 500)), cov=rnorm(1000, 1, .4))
w.out <- weightit(treat ~ cov, data=t1, estimand="ATE")
Error: The treatment and covariates must have the same number of units.
The treatment and covariate have the same length, so what's behind the error? Thanks.
This was a bug that has been fixed in the development version of WeightIt. Install it using devtools::install_github("ngreifer/WeightIt") and try again. I'll submit the updated version to CRAN soon.
I just installed WeightIt and am getting an error; minimal example code provided below. What's going wrong?
The treatment and covariate have the same length, so what's behind the error? Thanks.