I've created a linear model in R:
mod = lm(train_y ~ train_x). I want to pass it a list of X's and get its predicted/estimateed/forecasted Y. I looked at
predict(), but I think that is for something else, or I just don't know how to use it.
I'm guessing by taking the coefficients of my model, I could manually plugin the test_x variables one-by-one, and get a predicted Y, but I'm guessing there is a more efficient way to do this.