ims-tutorials icon indicating copy to clipboard operation
ims-tutorials copied to clipboard

Tutorial 4.2 - calculating the p-values - - visualise()

Open fernando-pierucci-alves opened this issue 1 year ago • 2 comments

Contact Details

No response

Bug

It seems an update to Infer package makes the following code obsolete. If so, the tutorial is much worth an update.

gender_discrimination_perm |> visualise(obs_stat = diff_orig, direction = "greater")

In Rstudio (linux), the following comes up:

"WARNING message: The arguments c("obs_stat", "direction") are deprecated in visualize() and will be ignored. They should now be passed to one of shade_p_value() or shade_confidence_interval(). "

Reproducible Example

gender_discrimination_perm |> visualise(obs_stat = diff_orig, direction = "greater")

Expected Behavior

Not sure what output would be.

Session Info

No response

Additional context

No response

fernando-pierucci-alves avatar Aug 10 '24 20:08 fernando-pierucci-alves

It looks like arguments were relocated from visualize() to shade_p_value() and shade_confidence_interval() in version 1.0.0 of the infer package:

Move forward with a number of planned deprecations. Namely, the GENERATION_TYPES object is now fully deprecated, and arguments that were relocated from visualize() to shade_p_value() and shade_confidence_interval() are now fully deprecated in visualize(). If supplied a deprecated argument, visualize() will warn the user and ignore the argument. -- https://infer.tidymodels.org/news/index.html#breaking-changes-1-0-0

Any lessons and exercises using the infer package (including 04-02-lesson.Rmd) will presumably need a fairly substantial re-write, if they are introducing the old approach to coding for the visualize() package.

mamcisaac avatar Aug 12 '24 14:08 mamcisaac

My view is that it is up to the authors to decide how to proceed. Thanks for looking at this problem. FPA

fernando-pierucci-alves avatar Aug 12 '24 18:08 fernando-pierucci-alves