Fits a function-on-scalar regression using functional principal components.
Examples
# \donttest{
Y <- fdata(matrix(rnorm(500), 50, 10), argvals = seq(0, 1, length.out = 10))
X <- cbind(rnorm(50), rnorm(50))
fit <- fosr.fpc(Y, predictors = X, ncomp = 2)
fit
#> Function-on-Scalar Regression
#> =============================
#> Number of observations: 50
#> Number of predictors: 2
#> Evaluation points: 10
#> R-squared: 0.0207
#> FPC components: 2
# }