This function calculates the predicted response matrix (Yhat) using Bhat (the coefficient of Ridge Redundancy Analysis) obtained from the rrda.fit function. The user can specify the ranks and lambda values to be used for the prediction. If not provided, the ranks and lambda values are set based on the Bhat components. The function returns the predicted Yhat matrix, as well as the ranks and lambda values used.
The predicted response matrix is calculated as:
$$\hat{Y}_r = X \left( \sum_{i=1}^{r} (F_{.i} G_{.i}^{\prime}) \right)
= \sum_{i=1}^{r} (X F_{.i} G_{.i}^{\prime})
= \sum_{i=1}^{r} (\tilde{X}_{.i} G_{.i}^{\prime})$$
Here, \(\tilde{X} = X F\), and \(r\) is the rank of \(\hat{B}(\lambda, r)\).
The regularized-rank-restricted estimation of \(B\) is obtained from the rrda.fit function:
$$\hat{B}(\lambda, r) = FG^{\prime}$$