lmerSeq.summary: Function to summarize individual regression coefficients

View source: R/lmerSeq_summary.R

lmerSeq.summaryR Documentation

Function to summarize individual regression coefficients

Description

Conducts t-tests on individual regression coefficients from fits done using lmerSeq_fit function

Usage

lmerSeq.summary(
  lmerSeq_results = NULL,
  coefficient = NULL,
  p_adj_method = "BH",
  ddf = "Satterthwaite",
  sort_results = T,
  include_singular = F
)

Arguments

lmerSeq_results

Results object from running lmerSeq.fit

coefficient

Character string or numeric indicator of which coefficient to summarize

p_adj_method

Method for adjusting for multiple comparisons (default is Benjamini-Hochberg). See p.adjust.methods

ddf

Method for computing degrees of freedom and t-statistics. Options are "Satterthwaite" and "Kenward-Roger"

sort_results

Should the results table be sorted by adjusted p-value?

Examples

data("expr_data")
vst_expr <- expr_example$vst_expr
sample_meta_data <- expr_example$sample_meta_data

##  Only including 10 genes in the expression matrix
vst_expr <- vst_expr[1:10, ]

##  Fit the Model
fit.lmerSeq <- lmerSeq.fit(form = ~ group * time + (1|ids),
                           expr_mat = vst_expr,
                           sample_data = sample_meta_data,
                           REML = T)

##  Summarize the time coefficient
model_sum <- lmerSeq.summary(lmerSeq_results = fit.lmerSeq,
                             coefficient = 3,
                             p_adj_method = 'BH',
                             ddf = 'Satterthwaite',
                             sort_results = T)
print(model_sum)


stop-pre16/lmerSeq documentation built on July 27, 2022, 9:08 a.m.