Predicts module scores for a prebuilt reference set's joinet model (a
two-layer elastic net stack) without needing to measure the full
proteomic panel. For "core_AD_plasma_biomarkers", this predicts all 75
module scores from Age, Gender, and the 8 core plasma biomarkers used in
the original analysis.
Arguments
- newdata
A data.frame or matrix with one row per sample and (at least) the columns required by the model; see
x_colsinload_prebuilt_wss_model()for the exact set and order. For"core_AD_plasma_biomarkers"this isAge(raw years),Gender(numeric,1= male,0= not male), and the 8 core biomarkers (PlasmaPTau181,PlasmaAB142P,PlasmaAB140P,PlasmaABRatio,PlasmapTau217,PlasmapTau217_AB42Ratio,PlasmaGFAP,PlasmaNfL).The biomarker columns must already be rank-based inverse-normal transformed before calling this function – see
normalize_wss_biomarkers()to build them from raw biomarker values, including for a single new patient.- prebuilt
Name of a prebuilt reference set. See
list_prebuilt_wss()for available options.- type
Prediction type passed to
predict.joinet():"response"(the default) or"link".
Value
A list with components base (first-layer-only predictions) and
meta (final stacked predictions), each a matrix with one row per
sample (row names taken from newdata, if present) and one column per
module (named by the model's outcomes).
Examples
if (FALSE) { # \dontrun{
# raw_biomarkers: one row per sample, the 8 raw (un-normalized) biomarker
# columns. Works for a single patient too.
normalized <- normalize_wss_biomarkers(raw_biomarkers)
newdata <- cbind(Age = ages, Gender = genders, normalized)
pred <- predict_WSS(newdata)
pred$meta
} # }
