I built a regression model using my training dataset, and I want to use this model to get predicted values in my testing dataset. Therefore, I can compare the predicted values with the actual values in the testing dataset and find the differences between them. However, I don't know how to plug values from the testing dataset to the model without using a for loop.
Here is my regression model:
lm.HOSPITAL <- lm(train_HOSPITAL$dailyQty ~ train_HOSPITAL$DC_STATE + train_HOSPITAL$TYPE_340B_CDE_DESC + train_HOSPITAL$geoState + train_HOSPITAL$IsFriSat)