Predict lm model in dplyr

Modeling in groups using "do" command is a great and very useful idea. Unfortunately I didn't find a way how to merge models to original or new dataset and use those models with predict command. When we deal with linear models we can hack this but with black box model cannot be done. Can anybody help me with this?


You didn't really give us enough info to help you. But if you'd like to see how someone else addressed this issue, this is a good place to start:

1 Like