I'm trying to make a multivariate plot but once I try to specify my yhat:
statsproject_robert$yhat <- my_glm$fitted.values
I get the following error message:
Error in $<-:
! Assigned data my_glm$fitted.values must be compatible with existing data.
Existing data has 112 rows.
Assigned data has 100 rows.
Only vectors of size 1 are recycled.
Caused by error in vectbl_recycle_rhs_rows():
! Can't recycle input of size 100 to size 112.
Run rlang::last_trace() to see where the error occurred.
This is the line of code but I don't know how to bypass the error values:
Additionally, if I wanted to use the log of some of the variables would I have to redefine the glm variable? Sorry for asking all these newbie questions, I'm still learning how to use R.