newmodel: Initialize an object of class newmodel

Description Usage Arguments Details Value Examples

View source: R/helper_methods.R

Description

Initialize an object of class newmodel

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
newmodel(
  X,
  V,
  W,
  beta,
  gamma,
  alpha,
  zeta,
  epsilon,
  epsilon_beta,
  epsilon_gamma,
  epsilon_W,
  epsilon_alpha,
  epsilon_zeta,
  n,
  J,
  K
)

Arguments

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.

W

matrix. The factors of sample-level latent factors.

beta

matrix or NULL. The coefficients of X in the regression of mu.

gamma

matrix or NULL. The coefficients of V in the regression of mu.

alpha

matrix or NULL. The coefficients of W in the regression of mu.

zeta

numeric. A vector of log of inverse dispersion parameters.

epsilon

nonnegative scalar. Regularization parameter.

epsilon_beta

nonnegative scalar. Regularization parameter for beta.

epsilon_gamma

nonnegative scalar. Regularization parameter for gamma.

epsilon_W

nonnegative scalar. Regularization parameter for W.

epsilon_alpha

nonnegative scalar. Regularization parameter for alpha

epsilon_zeta

nonnegative scalar. Regularization parameter for zeta.

n

integer. Number of samples.

J

integer. Number of genes.

K

integer. Number of latent factors.

Details

This is a wrapper around the new() function to create an instance of class newmodel. Rarely, the user will need to create a newmodel object from scratch, as tipically this is the result of newFit.

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:

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 newmodel objects. The main use of the class is within the newFit function.

Value

an object of class newmodel.

Examples

1
2
3
4

NewWave documentation built on Dec. 26, 2020, 6 p.m.