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

Ordered display of balance statistics breaks factor grouping. #33

Open
jwbowers opened this issue Jul 13, 2015 · 2 comments
Open

Ordered display of balance statistics breaks factor grouping. #33

jwbowers opened this issue Jul 13, 2015 · 2 comments
Assignees
Labels

Comments

@jwbowers
Copy link
Collaborator

Hi Y'all,

FYI, the order=TRUE argument mixes up the terms across factor groupings. Basically this means that order=TRUE is incompatible with factors variables right now. I don't think this is urgent, but just FYI.

I'm also not 100% sure that ordering the plots is recommended. I was doing it for a while, but I wonder if it draws too much attention to the one-by-one tests and away from the omnibus test.

 plot(xb, variable.labels = c(date = "Date",
                  t1 = "Time 1",
                  t2 = "Time 2",
                  cap = "Capacity",
                  ne = "In North East",
                  ct = "Cooling Tower",
                  bw = "Babcock-Wilcox",
                  cum.n = "Total Plants Built"),
          strata.labels = c("none" = "Raw Data", "pt" = "Partial Turn-key"),
          absolute = TRUE,
          groups = c("Group A", "Group A", "Group A", "Group B",
                     "Group B", "Group B", "Group A", "Group B"))

 plot(xb, variable.labels = c(date = "Date",
                  t1 = "Time 1",
                  t2 = "Time 2",
                  cap = "Capacity",
                  ne = "In North East",
                  ct = "Cooling Tower",
                  bw = "Babcock-Wilcox",
                  cum.n = "Total Plants Built"),
          strata.labels = c("none" = "Raw Data", "pt" = "Partial Turn-key"),
          absolute = TRUE,
          groups = c("Group A", "Group A", "Group A", "Group B",
                     "Group B", "Group B", "Group A", "Group B"), order=TRUE)
@benthestatistician
Copy link
Collaborator

Notes:

  1. Code block inside of balanceplot def beginning w/ if (order) has an inline comment suggesting an intention to address this problem. But I'm not seeing how the code block is attempting to address the problem. Maybe I'm being dense, or maybe the coder (Mark?) was distracted mid-block and thus didn't finish?
  2. I can confirm the problem. The xb that Jake refers to in the issue statement is produced by example(plot.xbal), btw.
  3. if this turns out not to be a quick fix, then one possibility is to temporarily disable the combo of order=T and !is.missing(groups), with a warning.

@benthestatistician
Copy link
Collaborator

Comment: I can think of possible uses for groupings of covariates in a revised and filled out version of the combined differences/chisquare statistic (cf #51, #25). This in turn suggests that groupings of covariate columns might profitably encoded in Design objects, perhaps in a lookup table similar to the OriginalCovariates slot, then passed down to xbal objects that get created along the way. (In which case there'd be no need to communicate this info to plot.xbal separately via a dedicated argument.)

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

No branches or pull requests

3 participants