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

Diff in means/props/medians #53

Closed
mine-cetinkaya-rundel opened this issue Nov 4, 2017 · 7 comments
Closed

Diff in means/props/medians #53

mine-cetinkaya-rundel opened this issue Nov 4, 2017 · 7 comments

Comments

@mine-cetinkaya-rundel
Copy link
Collaborator

Currently I believe the subtraction is being done in the alphabetical order of the levels if the categorical variable is character, and in the levels order if variable is factor. I think we need an order argument for calculate for "diff in ..."situations. This is how I had solved this problem in the inference function. Happy to do a PR but wanted to see (1) am I interpreting current status correctly and (2) is everyone on board with a new order argument that will be something like order = c("level1" - "level2") which translates to mean(y[x == "level1"]) - mean(y[x == "level2"]).

@ismayc
Copy link
Collaborator

ismayc commented Nov 4, 2017

I’m on board with this and it makes sense to me. Can you make a pull request to the dev branch? Or would you like this implemented in version 0.0.1 on master?

@mine-cetinkaya-rundel
Copy link
Collaborator Author

mine-cetinkaya-rundel commented Nov 4, 2017 via email

@ismayc
Copy link
Collaborator

ismayc commented Nov 4, 2017

@andrewpbray: Mine will be sending a pull request to master to implement this. Maybe update the package version to 0.0.2 as well with 0.1.0 having the theoretical distribution stuff on the dev branch?

@mine-cetinkaya-rundel
Copy link
Collaborator Author

For the record, I was wrong earlier, subtraction is done in reverse alphabetical order since calculate uses diff which works as follows:

> x <- c(1,3)
> diff(x)
[1] 2

@andrewpbray
Copy link
Collaborator

@mine-cetinkaya-rundel what's the status of this? The addition of the order argument should work with the new formulation of success in specify.

@mine-cetinkaya-rundel
Copy link
Collaborator Author

I'm working on it -- that's where the other question came about.

@ismayc ismayc closed this as completed Jan 5, 2018
@github-actions
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants