simultestentryX: Make inference for the entries of loading matrix.

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
  simultestentryX(hB, hH, sigma2vec, S1, S2, 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.

S1

a nn-by-2 matrix, where 1 <= nn <= (p*q), the set (one row is one element, the location of entries,i-th row and j-th column) of H01.

S2

a nn-by-2 matrix, where 1 <= nn <= (p*q), the set (one row is one element) 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 'testS1' and 'testS2', 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

indvec2matFun, Factorm,simultestrowX

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  ### Example
  p <- 500
  datlist1 <- gendata(n= 300, p = p, sigma2=1, rho=1, seed= 2)
  X <- datlist1$X
  fac <- Factorm(X)
  hH <- fac$hH; hB <- fac$hB; sigma2vec <- fac$sigma2vec
  S1 <- indvec2matFun(which(abs(datlist1$B0)>0), nrow=p)
  S2 <- indvec2matFun(which(abs(datlist1$B0)==0), nrow=p)
  # ex1: H01 is false, H02 is true
  simultestentryX(hB, hH, sigma2vec, S1=S1, S2=c(1,2), N=500, alpha=0.05, seed=5)
  # ex2: H01 is false; H02 is false.
  simultestentryX(hB, hH, sigma2vec, S1=S1, S2=S1, N=500, alpha=0.05, seed=5)
  # ex3: H01 is true; H02 is false
  simultestentryX(hB, hH, sigma2vec, S1=S2, S2=S1, N=500, alpha=0.05, seed=5)

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