Violated Assumptions
This lesson is called Violated Assumptions, part of the Inferential Statistics with R course. This lesson is called Violated Assumptions, part of the Inferential Statistics with R course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Your Turn
Try the various transformations on the age
variable. Do any of them improve the normality of the variable? Test using the shapiro_test()
function as you learned in the “Testing assumptions” lesson.
Learn More
Read more about the Winsorize() function in the DescTools package.
Read more about applying transformations in R.
Read more about performing the non-parametric equivalent statistics in the rstatix package:
wilcox_test() as the non-parametric equivalent of the independent samples t-test (note: this is synonymous of the Mann-Whitney U test)
sign_test() as the non-parametric equivalent of the dependent samples t-test
kruskall_test() as the non-parametric equivalent of the one-way ANOVA
friedman_test() as the non-parametric equivalent of the one-way repeated measures ANOVA
Have any questions? Put them below and we will help you out!
Course Content
21 Lessons
You need to be signed-in to comment on this post. Login.
Mike LeVan • January 9, 2025
Hi,
Sorry to be a pain. I am getting an error with the Winsorize example. I have entered the same command but am getting this :
Error in
mutate()
: ℹ In argument:iq = DescTools::Winsorize(iq, minval = 84, maxval = 125)
. Caused by error inDescTools::Winsorize()
: ! unused arguments (minval = 84, maxval = 125) Runrlang::last_trace()
to see where the error occurred.Backtrace: ▆
Run rlang::last_trace(drop = FALSE) to see 3 hidden frames.
Thanks for any insights, Mike
Dana Linnell • January 13, 2025
What version of DescTools do you have? I just installed the latest version of it and I'm having no issues running this code:
college %>% select(id, iq) %>% arrange(iq) %>% mutate(iq = DescTools::Winsorize(iq, minval = 84, maxval = 125))
Dana Linnell • January 13, 2025
What version of DescTools do you have? I just installed the latest version of it and I'm having no issues running this code:
college %>% select(id, iq) %>% arrange(iq) %>% mutate(iq = DescTools::Winsorize(iq, minval = 84, maxval = 125))