Description Usage Arguments Details Value Author(s) See Also
View source: R/predict.twostageSL.R
Obtains predictions on a new data set from a twostageSL
fit. May require
the original data if one of the library algorithms uses the original data in
its predict method.
1 2 |
object |
Fitted object from |
newdata |
New X values for prediction |
X |
Original data set used to fit |
Y |
Original outcome used to fit |
onlySL |
Logical. If TRUE, only compute predictions for algorithms with non-zero coefficients in the super learner object. Default is FALSE (computes predictions for all algorithms in library). |
... |
Additional arguments passed to the |
If newdata
is omitted the predicted values from object
are
returned. Each algorithm in the library.2stage
and library.1stage
needs to have a
corresponding prediction function with the “predict.” prefixed onto the
algorithm name (e.g. predict.SL.glm
for SL.glm
).
pred |
Predicted values from twostageSL fit |
library.predict |
Predicted values for each algorithm in library |
Ziyue Wu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.