# Fit row-column association models with the negative binomial distribution for the microbiome

## Documentation for package ‘RCM’ version 1.3.0

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

addOrthProjection | This function adds orthogonal projections to a given plot
arrayprod | An auxiliary R function to 'array' multiply an array with a vector, kindly provided by Joris Meys
buildCentMat | A function to build a centering matrix based on a dataframe
buildConfMat | A function to build the confounder matrices
buildConfMat.character | buildConfMat.character
buildConfMat.data.frame | buildConfMat.data.frame
buildCovMat | A function to build the covariate matrix of the constraints
buildDesign | A function to build the design matrix
deviances | A function to extract deviances for all dimension, including after filtering on confounders
dLR_nb | A function that returns the value of the partial derivative of the log-likelihood ratio to alpha, keeping the response functions fixed
dNBabunds | A score function for the column components of the independence model (mean relative abundances)
dNBlibSizes | A score function for the row components of the independence model (library sizes)
dNBllcol | A score function for the estimation of the column scores in an unconstrained RC(M) model
dNBllcolNP | Estimation of the parameters of a third degree GLM
dNBllcol_constr | The score function of the response function for 1 taxon at the time
dNBllcol_constr_noLab | The score function of the general response function
dNBllrow | A score function of the NB for the row scores
dNBpsis | A score function for the psi of a given dimension
ellipseCoord | A function that returns the coordinates of an ellipse
estDisp | Estimate the overdispersion
estNBparams | A function to estimate the taxon-wise NB-params
estNBparamsNoLab | A function to estimate the NB-params ignoring the taxon labels
estNPresp | Estimate the taxon-wise response functions non-parametrically
extractCoord | A function to extract plotting coordinates, either for plot.RCM or to export to other plotting software
extractE | A function to extract a matrix of expected values for any dimension of the fit
filterConfounders | 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.
getDevianceRes | A function to calculate the matrix of deviance residuals.
getDevMat | ACalculate the matrix of deviance residuals
getInflCol | A function to extract the influence for a given parameter index
getInflRow | Extract the influence of all observations on a given row score
getInt | Integrate the spline of an vgam object
getLogLik | Extract the logged likelihood of every count
getModelMat | A function to construct a model matrix of a certain degree
getRowMat | Return a matrix of row scores
heq_nb | Define linear equality constraints for env. gradient
heq_nb_jac | The jacobian of the linear equality constraints
indentPlot | Functions to indent the plot to include the entire labels
inertia | Calculate the log-likelihoods of all possible models
JacCol_constr | Jacobian of the constrained analysis with linear response function.
JacCol_constr_noLab | The jacobian of the response function without taxon labels
liks | Calculate the log-likelihoods of all possible models
LR_nb | Get the value of the log-likelihood ratio of alpha
LR_nb_Jac | A function that returns the Jacobian of the likelihood ratio
NBalphaInfl | Calculate the components of the influence functions
NBcolInfl | The influence function for the column scores
NBjacobianAbunds | Jacobian for the column components of the independence model
NBjacobianCol | Jacobian for the estimation of the column scores
NBjacobianColNP | Jacobian function for the estimation of a third degree GLM
NBjacobianLibSizes | Jacobian for the raw components of the independence model
NBjacobianPsi | Jacobian for the psi of a given dimension
NBjacobianRow | A jacobian function of the NB for the row scores
NBpsiInfl | The influence function for the psis
NBrowInfl | The influence function for the row scores
plot.RCM | Plot RC(M) ordination result with the help of ggplot2
plotRespFun | Plot the non-parametric response functions
RCM | Wrapper function for the RCM() function
RCM-method | Wrapper function for the RCM() function
RCM_NB | Fit the RC(M) model with the negative binomial distribution.
residualPlot | Make residual plots
respFunJacMat | Calculates the Jacobian of the parametric response functions
respFunScoreMat | Derivative of the Lagrangian of the parametric response function
rowMultiply | A function to efficiently row multiply a matrix and a vector
seq_k | A small auxiliary function for the length of the lambdas
trimOnConfounders | Trim based on confounders to avoid taxa with only zero counts
Zeller | Microbiomes of colorectal cancer patients and healthy controls