update.RRRR will update online robust reduced-rank regression model with class RRRR(ORRRR) using newly added data to achieve online estimation. Estimation methods:

SMM

Stochastic Majorisation-Minimisation

SAA

Sample Average Approximation

# S3 method for RRRR
update(
  object,
  newy,
  newx,
  newz = NULL,
  addon = object$spec$addon,
  method = object$method,
  SAAmethod = object$SAAmethod,
  ...,
  ProgressBar = requireNamespace("lazybar")
)

Arguments

object

A model with class RRRR(ORRRR)

newy

Matrix of dimension N*P, the new data y. The matrix for the response variables. See Detail.

newx

Matrix of dimension N*Q, the new data x. The matrix for the explanatory variables to be projected. See Detail.

newz

Matrix of dimension N*R, the new data z. The matrix for the explanatory variables not to be projected. See Detail.

addon

Integer. The number of data points to be added in the algorithm in each iteration after the first.

method

Character. The estimation method. Either "SMM" or "SAA". See Description.

SAAmethod

Character. The sub solver used in each iteration when the methid is chosen to be "SAA". See Detail.

...

Additional arguments to function

optim

when the method is "SAA" and the SAAmethod is "optim"

RRRR

when the method is "SAA" and the SAAmethod is "MM"

ProgressBar

Logical. Indicating if a progress bar is shown during the estimation process. The progress bar requires package lazybar to work.

Value

A list of the estimated parameters of class ORRRR.

method

The estimation method being used

SAAmethod

If SAA is the major estimation method, what is the sub solver in each iteration.

spec

The input specifications. \(N\) is the sample size.

history

The path of all the parameters during optimization and the path of the objective value.

mu

The estimated constant vector. Can be NULL.

A

The estimated exposure matrix.

B

The estimated factor matrix.

D

The estimated coefficient matrix of z.

Sigma

The estimated covariance matrix of the innovation distribution.

obj

The final objective value.

data

The data used in estimation.

Details

The formulation of the reduced-rank regression is as follow: $$y = \mu +AB' x + D z+innov,$$ where for each realization \(y\) is a vector of dimension \(P\) for the \(P\) response variables, \(x\) is a vector of dimension \(Q\) for the \(Q\) explanatory variables that will be projected to reduce the rank, \(z\) is a vector of dimension \(R\) for the \(R\) explanatory variables that will not be projected, \(\mu\) is the constant vector of dimension \(P\), \(innov\) is the innovation vector of dimension \(P\), \(D\) is a coefficient matrix for \(z\) with dimension \(P*R\), \(A\) is the so called exposure matrix with dimension \(P*r\), and \(B\) is the so called factor matrix with dimension \(Q*r\). The matrix resulted from \(AB'\) will be a reduced rank coefficient matrix with rank of \(r\). The function estimates parameters \(\mu\), \(A\), \(B\), \(D\), and \(Sigma\), the covariance matrix of the innovation's distribution.

See ?ORRRR for details about the estimation methods.

See also

ORRRR, RRRR, RRR

Author

Yangzhuoran Yang

Examples

# \donttest{
set.seed(2222)
data <- RRR_sim()
newdata <- RRR_sim(A = data$spec$A,
                   B = data$spec$B,
                   D = data$spec$D)
res <- ORRRR(y=data$y, x=data$x, z = data$z)
res <- update(res, newy=newdata$y, newx=newdata$x, newz=newdata$z)
res
#> 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.081655 -0.158088  1.496688  0.199765  0.678863 -0.025287  0.040417
#> 2  0.144781  0.457460  0.953595  1.107235 -0.025287  0.673433 -0.026088
#> 3  0.097791  0.826780 -0.664568  1.963563  0.040417 -0.026088  0.699273
# }