cruv4: RUV4's second step.

Description Usage Arguments Author(s)

View source: R/ruv4.R

Description

This is the old version that only works for one covariate of interest. Use cruv4_multicov for the more recent version.

Usage

1
2
3
4
5
6
7
8
9
cruv4(
  betahat_ols,
  alpha_scaled,
  sig_diag_scaled,
  ctl,
  degrees_freedom,
  gls = TRUE,
  likelihood = "t"
)

Arguments

betahat_ols

A matrix of numerics with one column. The ols estimates of beta.

alpha_scaled

A matrix of numerics. The estimated coefficients of the unobserved confounders.

sig_diag_scaled

A vector of positive numerics. The estimated standard errors of betahat_ols.

ctl

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

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.