lme_cor: Linear Mixed Effect Models with random variable

View source: R/lme_cor.R

lme_corR Documentation

Linear Mixed Effect Models with random variable

Description

Linear Mixed Effect Models with random variable

Usage

lme_cor(
  MAE,
  tax_level,
  feature,
  exp_var,
  random_var,
  datatype = c("logcpm", "relabu", "counts"),
  tolerance
)

Arguments

MAE

A multi-assay experiment object

tax_level

The classification level used for feature

feature

A given feature from count data, which should be correlated with variable

random_var

Random variable, which should be taken into account for correlation, eg. 'Location' or 'batch effect'.

datatype

Select datatype, like relative abundance (relabu), counts, or logcpm

tolerance

Tolerance of dispersion for correlation adjustment

variable

Numeric variable for correlation, eg. 'weight'

Value

A plotly object, a ggplot object for pdf saving, and a table with statistics

Examples

data_dir = system.file('inst/extdata/NWS_MAG_Profiling.rds', package = 'QuickFixR')
df <- readRDS(data_dir)
p <- lme_cor(df,
                    tax_level='Genus',
                    feature = 'Mycoplasma'
                    variable='Weight_g',
                    random_var="Location",
                    datatype = "relabu")
p


JacobAgerbo/QuickFixR documentation built on Sept. 20, 2023, 12:40 p.m.