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

Tutorial 4 - Lesson 2: Randomization test, What is a p-value?, Calculating the p-values - problem with code exercise #117

Closed
IZE85 opened this issue Aug 9, 2021 · 3 comments

Comments

@IZE85
Copy link

IZE85 commented Aug 9, 2021

In "Tutorial 4 - Lesson 2: Randomization test", in the subsection "What is a p-value?", under "Calculating the p-values", there is a code exercise, where you have to use the "visualize()" and "get_p_value" functions.

Unfortunately, i am not able to solve this exercise, as the console always returns me "argument is of length zero".

I was not sure whether this problem is due to my inability to solve the exercise or some other issues. Could you help me clarify, whether my coding is wrong?

Visualize and calculate the p-value for the original dataset

gender_discrimination_perm %>%
visualize(obs_stat = diff_orig, direction = "greater")

gender_discrimination_perm %>%
get_p_value(obs_stat = diff_orig, direction = "greater")

Visualize and calculate the p-value for the small dataset

gender_discrimination_small_perm %>%
visualize(obs_stat = diff_orig_small, direction = "greater")

gender_discrimination_small_perm %>%
get_p_value(obs_stat = diff_orig_small, direction = "greater")

Visualize and calculate the p-value for the big dataset

gender_discrimination_big_perm %>%
visualize(obs_stat = diff_orig_big, direction = "greater")

gender_discrimination_big_perm %>%
get_p_value(obs_stat = diff_orig_big, direction = "greater")

@IZE85
Copy link
Author

IZE85 commented Aug 10, 2021

I assume there is an issue with the "visualize()" and the "get_p_value()" functions, as also in "Tutorial 4 - Lesson 3: Errors in hypothesis testing" in the subsection "Example: opportunity cost" we have to use these functions and the console still returns me "argument is of length zero"

@mine-cetinkaya-rundel mine-cetinkaya-rundel transferred this issue from OpenIntroStat/ims Sep 2, 2021
@mamcisaac
Copy link
Contributor

This code all works for me.

@npaterno
Copy link
Collaborator

npaterno commented Feb 9, 2023

Unable to duplicate the error on Mac, Windows or Linux.

@npaterno npaterno closed this as completed Feb 9, 2023
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

3 participants