rndEffModelFitting: Fit random-effects model

View source: R/functions.R

rndEffModelFittingR Documentation

Fit random-effects model

Description

Fit the random-effects model to the given data using an expectation-maximization algorithm.

Usage

rndEffModelFitting(
  theta_0,
  V,
  M,
  M_bdiag,
  y,
  VCNs,
  nObs,
  maxit,
  maxemit,
  eps = 1e-05,
  thetaLB,
  thetaUB,
  factr,
  pgtol,
  lmm,
  trace = TRUE,
  verbose = TRUE
)

Arguments

theta_0

p-dimensional vector parameter used as initial guess in the inference procedure.

V

A p \times K dimensional net-effect matrix.

M

A n \times K dimensional (design) matrix.

M_bdiag

An \times Jp dimensional block-diagonal design matrix. Each j-th block (j = 1,\dots,J) is a n_j \times p dimensional design matrix for the j-th clone.

y

n-dimensional vector of the time-adjacent cellular increments

VCNs

A n-dimensional vector including values of the vector copy number corresponding to the cell counts of y.

nObs

A K-dimensional vector including the frequencies of each clone k (k = 1,\dots,K).

maxit

maximum number of iterations for the optimization step. This argument is passed to optim() function. Details on "maxit" can be found in "optim()" documentation page.

maxemit

maximum number of iterations for the expectation-maximization algorithm.

eps

relative error for the value x and the objective function f(x) that has to be optimized in the expectation-maximization algorithm.

thetaLB

p-dimensional vector of lower bound values for theta.

thetaUB

p-dimensional vector of upper bound values for theta.

factr

controls the convergence of the "L-BFGS-B" method. Convergence occurs when the reduction in the objective is within this factor of the machine tolerance. Default is 1e7, that is a tolerance of about 1e-8. This argument is passed to optim() function.

pgtol

helps control the convergence of the "L-BFGS-B" method. It is a tolerance on the projected gradient in the current search direction. This defaults to zero, when the check is suppressed. This argument is passed to optim() function.

lmm

is an integer giving the number of BFGS updates retained in the "L-BFGS-B" method, It defaults to 5. This argument is passed to optim() function.

trace

Non-negative integer. If positive, tracing information on the progress of the optimization is produced. This parameter is passed to the optim() function. Higher values may produce more tracing information: for method "L-BFGS-B" there are six levels of tracing. (To understand exactly what these do see the source code: higher levels give more detail.)

verbose

(defaults to TRUE) Logical value. If TRUE, then information messages on the progress of the algorithm are printed to the console.

Value

The output returned by "optim()" function (see "optim()" documentation for details) along with the conditional expectation E[u \vert y] and variance V[u \vert y] of the latent states u given the observed states y from the last step of the expectation-maximization algorithm.


RestoreNet documentation built on May 29, 2024, 4 a.m.