Multiple Regression
This lesson is called Multiple Regression, part of the Inferential Statistics with R course. This lesson is called Multiple Regression, 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
Perform a multiple regression examining how both iq
and act_science
predict act_reading
. Ask for standardized coefficients before calling for the summary of results. Which (if any) of the IVs are significant predictors? Based on the standardized coefficient, which is the stronger predictor of ACT readings cores?
Learn More
Read more about the lm()
function in the stats package.
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 8, 2025
Hi,
I am getting an error when I try to change the reference level. I have checked my code and it is the same as yours, but I get this error :
Thanks, Mike
David Keyes Founder • January 8, 2025
I'm guessing your code looks like this:
If so, you need to change it to this (note the
c()
around the levels):Let me know if that solves it for you!
Mike LeVan • January 9, 2025
Hi,
Appreciate your time.
Thanks for the idea, but that didn't fix the issue. Still getting this error :
Error in
mutate()
: ℹ In argument:gender = fct_relevel(gender, levels = c("Trans*", "Female", "Male"))
. Caused by error infct_relevel()
: ! Arguments in...
must be passed by position, not name. ✖ Problematic argument: • levels = c("Trans*", "Female", "Male")Thanks, Mike
Dana Linnell • January 11, 2025
fct_relevel must have changed since I created this many years ago. This line of code worked for me:
mutate(gender = fct_relevel(gender, "Trans*", "Female", "Male"))