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 | simultestrowX(hB, hH, sigma2vec, G1, G2, 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. |
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. |
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.
nothing
Liu Wei
Wei Liu, Huazhen Lin, Jin Liu (2020). Estimation and inference on high-dimensional sparse factor models.
factor
, Factorm
,simultestentryX
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.