adjust.latent: Adjust for latent factors, after rotationn

Description Usage Arguments Details Value See Also

View source: R/adjust_functions.R

Description

Adjust for latent factors, after rotationn

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
adjust.latent(
  corr.margin,
  n,
  X.cov,
  Gamma,
  Sigma,
  method = c("rr", "nc", "lqs"),
  psi = psi.huber,
  nc = NULL,
  nc.var.correction = TRUE
)

Arguments

corr.margin

marginal correlations, p*d1 matrix

n

sample size

X.cov

estimated second moment of X, d*d matrix

Gamma

estimated confounding effects, p*r matrix

Sigma

diagonal of the estimated noise covariance, p*1 vector

method

adjustment method

psi

derivative of the loss function in robust regression, choices are psi.huber, psi.bisquareand psi.hampel

nc

position of the negative controls

nc.var.correction

correct asymptotic variance based on our formula

Details

The function essentially runs a regression of corr.margin ~ Gamma. The sample size n is needed to have the right scale.

This function should only be called if you know what you are doing. Most of the time you want to use the main function cate to adjust for confounders.

Value

a list of objects

alpha

estimated alpha, r*d1 matrix

beta

estimated beta, p*d1 matrix

beta.cov.row

estimated row covariance of beta, a length p vector

beta.cov.col

estimated column covariance of beta, a d1*d1 matrix

See Also

cate


cate documentation built on July 2, 2020, 4:08 a.m.