Scalar-on-function regression (functional coefficient)
Source:R/stats-functional-regression.R
scalarOnFunctionRegression.RdPredicts a scalar outcome from a predictor CURVE (e.g. a clinical score from a joint-moment waveform). The curve is reduced to functional principal components, the outcome is regressed on the scores, and the coefficients are mapped back to a coefficient function beta(t): where along the curve the predictor matters.
Value
a sofr_result: beta (length-P coefficient function), intercept,
fitted, r_squared, npc, scores, pve (proportion variance explained
by the retained PCs).