Data Science, Machine Learning, Rstats, Regression.
squared: cars.poly <- cbind(cars, I(cars$dist^2)) names(cars.poly)[ncol(cars.poly)] <- 'dist_2' Now we estimate the model, simulate and plot the quantities of interest (which here is the expected speed given specific dist distances) library(Zelig) library(dplyr) # Find range of dist to use as