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

[JOSS Review] Don't understand when generate(..., type="draw") is applicable #415

Closed
kellieotto opened this issue Sep 6, 2021 · 1 comment · Fixed by #418
Closed

[JOSS Review] Don't understand when generate(..., type="draw") is applicable #415

kellieotto opened this issue Sep 6, 2021 · 1 comment · Fixed by #418

Comments

@kellieotto
Copy link

This comment is part of your JOSS Review.

I'm unclear on how to use type="draw" in the generate function. At a minimum, it would be helpful to clarify the draw method and show an example how to use this in the documentation for generate.

From reading the docs, it seems like I should be able to use the draw method to sample data according to a point estimate null hypothesis. If I express that the null point estimate is mu=40, I expect that the draw method will randomly sample some normally distributed data with mean 40 and some variance. However this example gives an error:

> gss %>%
+     specify(response = hours) %>%
+     hypothesize(null = "point", mu = 40) %>%
+     generate(reps = 1000, type = "draw")
Error in sample.int(length(x), size, replace, prob) : 
  NA in probability vector
In addition: Warning message:
You have given `type = "draw"`, but `type` is expected to be `"bootstrap"`. This workflow is untested and the results may not mean what you think they mean. 

I see there are some examples where the draw method applies to proportions in vignette("observed_stat_examples"). If it only works with proportions, can you please clarify that in the generate docs and add an example there?

@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 Sep 22, 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

Successfully merging a pull request may close this issue.

1 participant