One my students keeps getting an error in Notebook 4. She is on a Mac, and was originally using Safari. I encouraged her to download and use Chrome, but the error still persists.
We've tried reconnecting, restarting, running all, running all above, re-running each code box by hand, and it still doesn't work.
She gets the error when she tries to run the provided code to make the polynomial functions of different degrees. She gets this error:
Error in eval(predvars, data, env): object 'default_rate' not found
Traceback:
- predict(sat_model_1, newdata = data.frame(SAT_avg = test_dat$SAT_avg))
- predict.lm(sat_model_1, newdata = data.frame(SAT_avg = test_dat$SAT_avg))
- model.frame(Terms, newdata, na.action = na.action, xlev = object$xlevels)
- model.frame.default(Terms, newdata, na.action = na.action, xlev =␣
↪object$xlevels)
- eval(predvars, data, env)
- eval(predvars, data, env)
In earlier parts of the notebook, she is able to find the correlation, for example, using:
cor(test_dat$default_rate, pred_deg5) ^ 2
so it seems like the program can find and use the variable default_rate.
Any help would be greatlly appreciated by both of us!
Bill