Day 6: Multiple Linear Regression: Predicting House Prices
-
-
BryanRJ 9 years ago The "data=foo" argument there tells R that data are supposed to come from the frame named "foo".
I always recommend building a data frame before performing regression or other modeling. It makes things easier in R.
-
when you did "lm(price ~ ., data=foo)" did you have the data saved in data frames?
I was having trouble doing it this way because price needs to be assigned to the last vector. did you just rename the final entry to price in the data frame or did you just have all the vectors floating free in the global environment?
Add Reply Preview cancel