The R package RRRR provides methods for estimating online Robust Reduced-Rank Regression.
To cite package ‘RRRR’ in publications use:
Yangzhuoran Fin Yang and Ziping Zhao (2020). RRRR: Online Robust Reduced-Rank Regression Estimation. R package version 1.0.0. https://pkg.yangzhuoranyang.com/RRRR/.
You can install the stable version on R CRAN.
You can install the development version from Github with:
The R package RRRR provides the following estimation methods.
RRR
RRRR
ORRRR
RRR
): update.RRRR
See the vignette for a more detailed illustration.
library(RRRR)
set.seed(2222)
data <- RRR_sim()
res <- ORRRR(y=data$y, x=data$x, z=data$z)
res
#> Online Robust Reduced-Rank Regression
#> ------
#> Stochastic Majorisation-Minimisation
#> ------------
#> Specifications:
#> N P R r initial_size addon
#> 1000 3 1 1 100 10
#>
#> Coefficients:
#> mu A B D Sigma1 Sigma2 Sigma3
#> [1,] 0.078343 -0.16766 1.55325 0.20475 0.656940 -0.044872 0.050316
#> [2,] 0.139471 0.44229 0.91983 1.13833 -0.044872 0.657402 -0.063890
#> [3,] 0.106746 0.80182 -0.69377 1.95502 0.050316 -0.063890 0.698777
plot(res)
newdata <- RRR_sim(A = data$spec$A,
B = data$spec$B,
D = data$spec$D)
res2 <- update(res, newy=newdata$y, newx=newdata$x, newz=newdata$z)
res2
#> Online Robust Reduced-Rank Regression
#> ------
#> Stochastic Majorisation-Minimisation
#> ------------
#> Specifications:
#> N P R r initial_size addon
#> 2000 3 1 1 1010 10
#>
#> Coefficients:
#> mu A B D Sigma1 Sigma2 Sigma3
#> [1,] 0.073939 -0.15981 1.52031 0.20894 0.675436 -0.021789 0.040888
#> [2,] 0.142791 0.45099 0.96270 1.11702 -0.021789 0.679136 -0.024140
#> [3,] 0.107647 0.81759 -0.67044 1.95708 0.040888 -0.024140 0.703949
plot(res2)
This package is free and open source software, licensed under GPL-3.