The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Type: Package
Title: Robust Matrix Factor Model
Version: 1.1.0
Date: 2024-11-23
Author: Wei Liu [aut, cre]
Maintainer: Wei Liu <liuwei8@scu.edu.cn>
Description: We introduce a robust matrix factor model that explicitly incorporates tail behavior and employs a mean-shift term to avoid efficiency losses through pre-centering of observed matrices. More details on the methods related to our paper are currently under submission. A full reference to the paper will be provided in future versions once the paper is published.
License: GPL-3
Depends: irlba, R (≥ 3.5.0)
Imports: stats, LaplacesDemon, MixMatrix, COAP, Rcpp (≥ 1.0.10)
Suggests: knitr, rmarkdown
LinkingTo: Rcpp, RcppArmadillo
Encoding: UTF-8
RoxygenNote: 7.3.2
NeedsCompilation: yes
Packaged: 2024-11-25 12:23:13 UTC; 10297
Repository: CRAN
Date/Publication: 2024-11-26 12:50:09 UTC

Select the structure dimension of factor matrix

Description

Select the structure dimension of factor matrix in the high-dimensional robust matrix factor model

Usage

ER.RMFM(
  X,
  r_max = 10,
  epsELBO = 1e-09,
  maxIter = 20,
  verbose = FALSE,
  seed = 1
)

Arguments

X

a p1* p2*T array, which is the observed matrix from each individual, where T is the sample size.

r_max

an optional positive integer, specify the upper bound of row and column factors; default as 10.

epsELBO

an optional positive value, tolerance of relative variation rate of the variational lower bound value, default as '1e-9'.

maxIter

the maximum iteration of the VEM algorithm. The default is 30.

verbose

a logical value, whether output the information in iteration.

seed

an optional integer, specify the random seed for reproducibility in initialization.

Details

None

Value

return a list including the following components:

References

None

See Also

None

Examples

r1 <- 4; r2 <- 3;
Tt <- 100; type <- 'MatrixT'
p1 <- 50; p2 <- 50
datlist <- gendata_rmfm(Tt = Tt,p1 =p1, p2=p2, r1=r1, r2=r2,
                        rho=1, type= 'MatrixT', nu=3)
str(datlist)
res <- ER.RMFM(datlist$X, r_max=10,   epsELBO=1e-9, maxIter=10, verbose=FALSE, seed=1)
res

Fit the high-dimensional robust matrix factor model

Description

Fit the high-dimensional robust matrix factor model via variational inference.

Usage

RMFM(
  X,
  r1 = 10,
  r2 = 10,
  epsELBO = 1e-09,
  maxIter = 30,
  verbose = TRUE,
  seed = 1,
  cal_eigs = FALSE
)

Arguments

X

a p1* p2*T array, which is the observed matrix from each individual, where T is the sample size.

r1

an optional positive integer, specify the number of row factors; default as 10.

r2

an optional positive integer, specify the number of column factors; default as 10.

epsELBO

an optional positive value, tolerance of relative variation rate of the variational lower bound value, default as '1e-9'.

maxIter

the maximum iteration of the VEM algorithm. The default is 30.

verbose

a logical value, whether output the information in iteration.

seed

an optional integer, specify the random seed for reproducibility in initialization.

cal_eigs

an optional logical value, specify whether calculate the eigenvalues of covariance matrix, default as FALSE.

Details

None

Value

return a list including the following components:

References

None

See Also

None

Examples

r1 <- 4; r2 <- 3;
Tt <- 100; type <- 'MatrixT'
p1 <- 50; p2 <- 50
datlist <- gendata_rmfm(Tt = Tt,p1 =p1, p2=p2, r1=r1, r2=r2,
                        rho=1, type= 'MatrixT', nu=1)
str(datlist)
reslist <- RMFM(X=datlist$X, r1=r1, r2=r2,  verbose = TRUE, maxIter = 6)

Generate simulated data

Description

Generate simulated data from robust matrix factor models

Usage

gendata_rmfm(
  Tt = 100,
  p1 = 50,
  p2 = 40,
  r1 = 4,
  r2 = 3,
  rho = 0.01,
  type = c("MatrixT", "MatrixN"),
  nu = 1
)

Arguments

Tt

a positive integer, specify the sample size.

p1

a positive integer, specify the row dimension of the observed matrix.

p2

a positive integer, specify the column dimension of the observed matrix.

r1

a positive integer, specify the number of row factors; default as 4

r2

a positive integer, specify the number of column factors; default as 3.

rho

a positive real, specify the signal strength of factor matrices.

type

a string, specify the type of error matrix, default as type='MatrixN'; supportint matrix t distribution 'MatrixT' and matrix normal distribution 'MatrixN'.

nu

a positive integer, specify the degree freedom of the matrix t distribution when type='MatrixT'.

Value

return a list including the following components:

Examples

r1 <- 4; r2 <- 3;
Tt <- 100; type <- 'MatrixT'
p1 <- 100; p2 <- 50
datlist <- gendata_rmfm(Tt = Tt,p1 =p1, p2=p2, r1=r1, r2=r2,
                         rho=0.01, type=type, nu=1)
str(datlist)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.