simultestrowX: Make inference for the loading vectors.

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

Conduct the simultaneous inference for a set of loading vectors as for two NUll hypothesises H01 and H02, where H01 assume the set of loading vectors are all zeroes, H02 assume there exists a loading vector equal to zero.

Usage

1
  simultestrowX(hB, hH, sigma2vec, G1, G2, N=500, alpha=0.05, seed=1)

Arguments

hB

a p-by-q matrix, the estimated loading matrix

hH

a n-by-q matrix, the estimated factors matrix.

sigma2vec

a p-dimensional vector, the estimated variance for each error term in model.

G1

a positive vector with values between 1 and p, the set of H01.

G2

a positive vector with values between 1 and p, the set of H02.

N

a positive number, the bootstrap size.

alpha

a positive number, the significant level.

seed

a non-negative integer, the random seed.

Value

return a matrix with row names 'testG1' and 'testG2', and column names 'Critical value', 'Test statistic', 'reject', and 'p-value', including all the information about testing.

Note

nothing

Author(s)

Liu Wei

References

Wei Liu, Huazhen Lin, Jin Liu (2020). Estimation and inference on high-dimensional sparse factor models.

See Also

factor, Factorm,simultestentryX

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  ### Example
  dat <- gendata(n = 300, p = 500, only.rowsp = T)
  res <- Factorm(dat$X)
  X <- dat$X
  fac <- Factorm(X)
  hH <- fac$hH; hB <- fac$hB; sigma2vec <- fac$sigma2vec
  # ex1: H01 is false, H02 is true
  G1 <- 1:10; # all are nonzero loading vectors
  G2 <- 481:500 # all are zero loading vectors
  simultestrowX(hB, hH, sigma2vec, G1=G1, G2=G2, N=1000, alpha=0.05, seed=2)
  # ex2: H01 is false; H02 is false.
  simultestrowX(hB, hH, sigma2vec, G1=1:10, G2=20:30, N=1000, alpha=0.05, seed=2)
  # ex3: H01 is true; H02 is false
  simultestrowX(hB, hH, sigma2vec, G1=c(481:500), G2=20:30, N=1000, alpha=0.05, seed=2)

feiyoung/SpagFainfer documentation built on April 4, 2020, 5:20 p.m.