filterConfounders: Filters out the effect of known confounders. This is done by...

Description Usage Arguments Value

View source: R/F_filterConfounders.R

Description

Filters out the effect of known confounders. This is done by fitting interactions of every taxon with the levels of the confounders. It returns a modified offset matrix for the remainder of the fitting procedure.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
filterConfounders(
  muMarg,
  confMat,
  X,
  thetas,
  p,
  n,
  nleqslv.control,
  trended.dispersion,
  tol = 0.001,
  maxIt = 20,
  allowMissingness,
  naId
)

Arguments

muMarg

a nxp matrix, the current offset

confMat

a nxt confounder matrix

X

the nxp data matrix

thetas

a vector of length p with the current dispersion estimates

p

an integer, the number of columns of X

n

an integer, the number of rows of X

nleqslv.control

see nleqslv()

trended.dispersion

a vector of length p with trended dispersion estimates

tol

a scalar, the convergence tolerance

maxIt

maximum number of iterations

allowMissingness

A boolean, are missing values present

naId

The numeric index of the missing values in X

Fits the negative binomial mean parameters and overdispersion parameters iteratively. Convergence is determined based on the L2-norm of the absolute change of mean parameters

Value

a list with components:

thetas

new theta estimates

NB_params

The estimated parameters of the interaction terms


RCM documentation built on Nov. 8, 2020, 5:22 p.m.

Related to filterConfounders in RCM...