Description Usage Arguments Value
View source: R/F_filterConfounders.R
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.
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
)
|
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 |
a list with components:
thetas |
new theta estimates |
NB_params |
The estimated parameters of the interaction terms |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.