Skip to content
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

subset.xbal: Variable, group interactions #16

Open
markmfredrickson opened this issue Nov 30, 2012 · 0 comments
Open

subset.xbal: Variable, group interactions #16

markmfredrickson opened this issue Nov 30, 2012 · 0 comments

Comments

@markmfredrickson
Copy link
Owner

The subset.xbal function takes a naive approach to selecting variables and groups. Variable selection only changes the $results array and group selection only applies to the $groups array. A proper implementation should interact the two, such that when selecting variables, only groups that include those variables are returned. Likewise, when selecting groups, only the variables in those groups are returned.

For example

xb <- xBalance(Z ~ X + Y + Z, data = d, groups = ("XY" = c("X", "Y")))
dimnames(select(xb, groups = c("XY"))$results)[[1]]

Should be c("X", "Y") (i.e., the variable Z is dropped).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant