I am trying to use predict function in RStudio on some new data. However I keep getting an error, "Error in qr.solve(qr.R(qrX)[p1, p1]) : singular matrix 'a' in solve". Where is my mistake? Should I have a simpler model?
lm.price.new <- lm(price ~ bedrooms * bathrooms * sqft_living * sqft_lot * floors *
waterfront * view * condition * grade, data = kc_house_data)
summary(lm.price.new)
new.house <- data.frame(bedrooms = 4, bathrooms = 2, sqft_living = 2560, sqft_lot = 7650,
floors = 1.5, waterfront = 1, view = 3, condition = 5,
grade = 10)
predict(lm.price.new, newdata = new.house, interval = "predict")
*with+