lori {lori} | R Documentation |
The lori method implements a method to analyze and impute incomplete count tables. An important feature of the method is that it can take into account main effects of rows and columns, as well as effects of continuous or categorical covariates, and interaction. The estimation procedure is based on minimizing a Poisson loss penalized by a Lasso type penalty (sparse vector of covariate effects) and a nuclear norm penalty inducing a low-rank interaction matrix (a few latent factors summarize the interactions).
Description
The lori method implements a method to analyze and impute incomplete count tables. An important feature of the method is that it can take into account main effects of rows and columns, as well as effects of continuous or categorical covariates, and interaction. The estimation procedure is based on minimizing a Poisson loss penalized by a Lasso type penalty (sparse vector of covariate effects) and a nuclear norm penalty inducing a low-rank interaction matrix (a few latent factors summarize the interactions).
Usage
lori(
Y,
cov = NULL,
lambda1 = NULL,
lambda2 = NULL,
intercept = T,
reff = T,
ceff = T,
rank.max = 2,
algo = c("alt", "mcgd"),
thresh = 1e-05,
maxit = 100,
trace.it = F,
parallel = F
)
Arguments
Y |
[matrix, data.frame] count table (nxp). |
cov |
[matrix, data.frame] design matrix (np*q) in order row1xcol1,row2xcol2,..,rownxcol1,row1xcol2,row2xcol2,...,...,rownxcolp |
lambda1 |
[positive number] the regularization parameter for the interaction matrix. |
lambda2 |
[positive number] the regularization parameter for the covariate effects. |
intercept |
[boolean] whether an intercept should be fitted, default value is FALSE |
reff |
[boolean] whether row effects should be fitted, default value is TRUE |
ceff |
[boolean] whether column effects should be fitted, default value is TRUE |
rank.max |
[integer] maximum rank of interaction matrix (smaller than min(n-1,p-1)) |
algo |
type of algorithm to use, either one of "mcgd" (mixed coordinate gradient descent, adapted to large dimensions) or "alt" (alternating minimization, adapted to small dimensions) |
thresh |
[positive number] convergence tolerance of algorithm, by default |
maxit |
[integer] maximum allowed number of iterations. |
trace.it |
[boolean] whether convergence information should be printed |
parallel |
[boolean] whether computations should be performed in parallel on multiple cores |
Value
A list with the following elements
X |
nxp matrix of log of expected counts |
alpha |
row effects |
beta |
column effects |
epsilon |
covariate effects |
theta |
nxp matrix of row-column interactions |
imputed |
nxp matrix of imputed counts |
means |
nxp matrix of expected counts (exp(X)) |
cov |
npxK matrix of covariates |
Examples