Use the MTPS Package
Introduction | Example Data | Model Fittig and Prediction | Revised Stacking Algorithm for Continuous Outcome | Revised Stacking Algorithm for Binary Outcome | Revised Stacking Algorithm for Mix Outcome | Specifying Models in Step 1 and Step 2 | Specify Different Base Learners for Different Outcomes within One Step | User-Defined Base Learners | Modify Arguments for Existing Base Learners | Define New Base Learners | Performance Comparison | Reference