We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start with the following code from the section titled "Constant variance among residuals".
df1 <- broom::augment(cv_model1$finalModel, data = ames_train)
The code that follows from the page does not work:
p1 <- ggplot(df1, aes(.fitted, .resid)) + geom_point(size = 1, alpha = .4) + xlab("Predicted values") + ylab("Residuals") + ggtitle("Model 1", subtitle = "Sale_Price ~ Gr_Liv_Area")
This is because .resid is not listed as a column in df1. This can be checked by invoking names(df1).
.resid
df1
names(df1)
To fix this, I had to modify the following line to the first piece of code shown above -- I had to add the .resid column.
df1 <- broom::augment(cv_model1$finalModel, data = ames_train) %>%mutate(.resid = Sale_Price - .fitted)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Start with the following code from the section titled "Constant variance among residuals".
df1 <- broom::augment(cv_model1$finalModel, data = ames_train)
The code that follows from the page does not work:
This is because
.resid
is not listed as a column indf1
. This can be checked by invokingnames(df1)
.To fix this, I had to modify the following line to the first piece of code shown above -- I had to add the
.resid
column.df1 <- broom::augment(cv_model1$finalModel, data = ames_train) %>%mutate(.resid = Sale_Price - .fitted)
The text was updated successfully, but these errors were encountered: