Description Usage Arguments Value Note Author(s) References See Also Examples
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.
1 | simultestentryX(hB, hH, sigma2vec, S1, S2, N=500, alpha=0.05, seed=1)
|
hB |
a |
hH |
a |
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. |
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.
nothing
Liu Wei
Wei Liu, Huazhen Lin, Jin Liu (2020). Estimation and inference on high-dimensional sparse factor models.
indvec2matFun
, Factorm
,simultestrowX
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.