NRRR.plot.reg: Plot heatmap for the functional regression surface

Description Usage Arguments Details Value References

View source: R/NRRR.plot.RegSurface.r

Description

This function creates heatmaps for the functional regression surface in a multivariate functional linear regression. Based on the fitting results from the nested reduced-rank regression, different kinds of regression surfaces (at the original scale or the latent scale) can be visualized to give a clear illustration of the functional correlation between the user-specified predictor (or latent predictor) trajectory and response (or latent response) trajectory.

Usage

1
2
3
4
5
NRRR.plot.reg(Ag, Bg, Al, Bl, rx, ry, sseq, phi, tseq, psi,
              x_ind, y_ind, x_lab = NULL, y_lab = NULL,
              tseq_index = NULL, sseq_index = NULL,
              method = c("latent", "x_original",
              "y_original", "original")[1])

Arguments

Ag, Bg, Al, Bl, rx, ry

the estimated U, V, A, B, rx and ry from a NRRR fitting.

sseq

the sequence of time points at which the predictor trajectory is observed.

phi

the set of basis functions to expand the predictor trajectory.

tseq

the sequence of time points at which the response trajectory is observed.

psi

the set of basis functions to expand the response trajectory.

x_ind, y_ind

two indices to locate the regression surface for which the heat map is to be drawn. If method = "original", then 0 < x_ind <= p, 0 < y_ind <= d and the function plots C_{x_ind,y_ind}(s,t) in Eq. (1) of the NRRR paper. If method = "latent", then 0 < x_ind <= rx, 0 < y_ind <= ry and the function plots C^*_{x_ind,y_ind}(s,t) in Eq. (2) of the NRRR paper. If method = "y_original", then 0 < x_ind <= rx, 0 < y_ind <= d. If method = "x_original", then 0 < x_ind <= p, 0 < y_ind <= ry.

x_lab, y_lab

the user-specified x-axis (with x_lab for predictor) and y-axis (with y_lab for response) label, and it should be given as a character string, e.g., x_lab = "Temperature".

tseq_index, sseq_index

the user-specified x-axis (with sseq_index for predictor) and y-axis (with tseq_index for response) tick marks, and it should be given as a vector of character strings of the same length as sseq or tseq, respectively.

method

'original': the function plots the correlation heatmap between the original functional response y_i(t) and the original functional predictor x_j(s); 'latent': the function plots the correlation heatmap between the latent functional response y^*_i(t) and the latent functional predictor x^*_j(s); 'y_original': the function plots the correlation heatmap between y_i(t) and x^*_j(s); 'x_original': the function plots the correlation heatmap between y^*_i(t) and x_j(s).

Details

More details and the examples of its usage can be found in the vignette of electricity demand analysis.

Value

A ggplot2 object.

References

Liu, X., Ma, S., & Chen, K. (2020). Multivariate Functional Regression via Nested Reduced-Rank Regularization. arXiv: Methodology.


xliu-stat/NRRR documentation built on Jan. 9, 2021, 3:23 p.m.