cruv4_multicov: RUV4's second step.

Description Usage Arguments Author(s)

View source: R/ruv4.R

Description

RUV4's second step.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
cruv4_multicov(
  Y2,
  alpha,
  sig_diag,
  ctl,
  R22,
  degrees_freedom,
  gls = TRUE,
  likelihood = "t"
)

Arguments

Y2

A matrix of numerics with p rows and q columns, where q is the number of covariates of interest and p is the number of genes.

alpha

A matrix of numerics of dimension p by k, where k is the number of hidden confounders. The estimated coefficients of the unobserved confounders.

sig_diag

A vector of positive numerics. The estimates of the variances.

ctl

A vector of logicals of length ncol(Y). If position i is TRUE then position i is considered a negative control.

R22

A matrix of numerics numeric. This is the submatrix of the R in the QR decomposition of X that corresponds to the covariates of interest. May be removed in the future.

degrees_freedom

A positive numeric. The degrees of freedom of the t-likelihood if using it.

gls

A logical. Should we use generalized least squares (TRUE) or ordinary least squares (FALSE) for estimating the confounders? The OLS version is equivalent to using RUV4 to estimate the confounders.

likelihood

Either "normal" or "t". If likelihood = "t", then the user may provide the degrees of freedom via degrees_freedom.

Author(s)

David Gerard


dcgerard/vicar documentation built on July 7, 2021, 1:08 p.m.