tidymodels submodel

I'm new to the tidymodels framework, and I'm trying to see if the following is possible:
Is it possible to have a "model" be an input to another model?
For example, say i have a data set with predictors X, and two response variables Y1 and Y2.
Can i build a model that predicts Y2 ~ X
then build a model Y1 ~ X + Predict(Y2) where each row gets the prediction from the model built on Y2 as response?
I know i can build a model on Y2, score Y2 on the data. Then model Y1 with the original predictors and output from Y2, however, when it comes to scoring Y1, i'd always have to score Y2 first.

Any help would be appreciated
Will

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.