-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
balanceTest()
should work without explicit data
argument
#30
Comments
Cross-linking w/ #15, which may be easier pickings once this can of worms has been opened. (And vice versa.) |
in light of d8bf73c , this may be working now on the clusters branch. Remains to be tested. |
I think this is basically enabled for set.seed(20180207)
n <- 100
x1 <- rnorm(n)
x2 <- rnorm(n)
x3 <- 0.5 + 0.25 * x1 - 0.25 * x2 + rnorm(n)
y <- sample(rep(c(1,0), n/2), prob = exp(x3) / (1 + exp(x3)))
xy <- data.frame(x1, x2, x3, y)
wts <- rpois(n, 7)
balanceTest(y ~ x1 + x2 + x3, data = xy, unit.weights = wts) rather you have to do xy.wts <- data.frame(xy, wts)
balanceTest(y ~ x1 + x2 + x3, data = xy.wts, unit.weights = wts) oughta fix this. |
xBalance
should work without explicit data
argumentbalanceTest()
should work without explicit data
argument
The counterexample in my last comment seems to have been fixed (in proj1-balT) somewhere along the way. OTOH > balanceTest(y ~ x1 + x2 + x3)
Error in terms.formula(formula, data = data) :
argument is not a valid model |
Doesn't work. It may be that some minor adjustments would get it to work, namely:
over to
and
2. inserting a switch around R/xBalance.make.stratwts.R:L31-36 so that, in the event that
data
is NULL,sweights
is evaluated asie, the code
,data[goodstrat.df[[nn]],,drop=FALSE]
is removed.The text was updated successfully, but these errors were encountered: