Description Usage Arguments Details Value Examples
View source: R/helper_methods.R
Initialize an object of class ZinbModel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | zinbModel(
X,
V,
O_mu,
O_pi,
which_X_mu,
which_X_pi,
which_V_mu,
which_V_pi,
W,
beta_mu,
beta_pi,
gamma_mu,
gamma_pi,
alpha_mu,
alpha_pi,
zeta,
epsilon,
epsilon_beta_mu,
epsilon_gamma_mu,
epsilon_beta_pi,
epsilon_gamma_pi,
epsilon_W,
epsilon_alpha,
epsilon_zeta,
epsilon_min_logit,
n,
J,
K
)
|
X |
matrix. The design matrix containing sample-level covariates, one sample per row. |
V |
matrix. The design matrix containing gene-level covariates, one gene per row. |
O_mu |
matrix. The offset matrix for mu. |
O_pi |
matrix. The offset matrix for pi. |
which_X_mu |
integer. Indeces of which columns of X to use in the regression of mu. |
which_X_pi |
integer. Indeces of which columns of X to use in the regression of pi. |
which_V_mu |
integer. Indeces of which columns of V to use in the regression of mu. |
which_V_pi |
integer. Indeces of which columns of V to use in the regression of pi. |
W |
matrix. The factors of sample-level latent factors. |
beta_mu |
matrix or NULL. The coefficients of X in the regression of mu. |
beta_pi |
matrix or NULL. The coefficients of X in the regression of pi. |
gamma_mu |
matrix or NULL. The coefficients of V in the regression of mu. |
gamma_pi |
matrix or NULL. The coefficients of V in the regression of pi. |
alpha_mu |
matrix or NULL. The coefficients of W in the regression of mu. |
alpha_pi |
matrix or NULL. The coefficients of W in the regression of pi. |
zeta |
numeric. A vector of log of inverse dispersion parameters. |
epsilon |
nonnegative scalar. Regularization parameter. |
epsilon_beta_mu |
nonnegative scalar. Regularization parameter for beta_mu. |
epsilon_gamma_mu |
nonnegative scalar. Regularization parameter for gamma_mu. |
epsilon_beta_pi |
nonnegative scalar. Regularization parameter for beta_pi. |
epsilon_gamma_pi |
nonnegative scalar. Regularization parameter for gamma_pi. |
epsilon_W |
nonnegative scalar. Regularization parameter for W. |
epsilon_alpha |
nonnegative scalar. Regularization parameter for alpha (both alpha_mu and alpha_pi). |
epsilon_zeta |
nonnegative scalar. Regularization parameter for zeta. |
epsilon_min_logit |
scalar. Minimum regularization parameter for parameters of the logit model, including the intercept. |
n |
integer. Number of samples. |
J |
integer. Number of genes. |
K |
integer. Number of latent factors. |
This is a wrapper around the new() function to create an
instance of class ZinbModel
. Rarely, the user will need to create a
ZinbModel
object from scratch, as tipically this is the result of
zinbFit
.
If any of X
, V
, W
matrices are passed,
n
, J
, and K
are inferred. Alternatively, the user can
specify one or more of n
, J
, and K
.
The regularization parameters can be set by a unique parameter
epsilon
or specific values for the different regularization
parameters can also be provided.
If only epsilon
is specified, the other parameters take the
following values:
epsilon_beta = epsilon/J
epsilon_gamma = epsilon/n
epsilon_W = epsilon/n
epsilon_alpha = epsilon/J
epsilon_zeta = epsilon
We empirically found that large values of epsilon
provide a more
stable estimation of W
.
A call with no argument has the following default values: n =
50
, J = 100
, K = 0
, epsilon=J
.
Although it is possible to create new instances of the class by
calling this function, this is not the most common way of creating
ZinbModel
objects. The main use of the class is within the
zinbFit
function.
an object of class ZinbModel
.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.