selectParams | R Documentation |
Select the number of factors and the rank of coefficient matrix in the covariate-augmented overdispersed Poisson factor model
selectParams(
X_count,
Z,
multiFac = rep(1, nrow(X_count)),
q_max = 15,
r_max = 24,
threshold = c(0.1, 0.01),
verbose = TRUE,
...
)
X_count |
a count matrix, the observed count matrix. |
Z |
an optional matrix, the covariate matrix; default as a full-one column vector if there is no additional covariates. |
multiFac |
an optional vector, the normalization factor for each unit; default as full-one vector. |
q_max |
an optional string, specify the upper bound for the number of factors; default as 15. |
r_max |
an optional integer, specify the upper bound for the rank of the regression coefficient matrix; default as 24. |
threshold |
an optional 2-dimensional positive vector, specify the the thresholds that filters the singular values of beta and B, respectively. |
verbose |
a logical value, whether output the information in iteration. |
... |
other arguments passed to the function |
The threshold is to filter the singular values with low signal, to assist the identification of underlying model structure.
return a named vector with names 'hr' and 'hq', the estimated rank and number of factors.
None
RR_COAP
n <- 300; p <- 100
d <- 20; q <- 6; r <- 3
datlist <- gendata_simu(seed=30, n=n, p=p, d=20, q=q, rank0=r)
str(datlist)
set.seed(1)
para_vec <- selectParams(X_count=datlist$X, Z = datlist$Z)
print(para_vec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.