selectParams {COAP}R Documentation

Select the parameters in COAP models

Description

Select the number of factors and the rank of coefficient matrix in the covariate-augmented overdispersed Poisson factor model

Usage

selectParams(
  X_count,
  Z,
  multiFac = rep(1, nrow(X_count)),
  q_max = 15,
  r_max = 24,
  threshold = c(0.1, 0.01),
  verbose = TRUE,
  ...
)

Arguments

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 RR_COAP.

Details

The threshold is to filter the singular values with low signal, to assist the identification of underlying model structure.

Value

return a named vector with names 'hr' and 'hq', the estimated rank and number of factors.

References

None

See Also

RR_COAP

Examples

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)

[Package COAP version 1.2 Index]