Means_DDCt: Relative expression (Delta Delta C_T) analysis using a fitted...

View source: R/Means_DDCt.r

Means_DDCtR Documentation

Relative expression (\Delta \Delta C_T) analysis using a fitted model

Description

Performs relative expression (fold change) analysis based on the \Delta \Delta C_T method using a fitted model object produced by ANOVA_DDCt() or REPEATED_DDCt().

Usage

Means_DDCt(model, specs, p.adj = "none")

Arguments

model

A fitted model object (typically an lmer or lm object) created by ANOVA_DDCt() or REPEATED_DDCt().

specs

A character string or character vector specifying the predictors or combinations of predictors over which fold change values are desired. This argument follows the specification syntax used by emmeans::emmeans() (e.g., "Factor", "Factor1 | Factor2").

p.adj

Character string specifying the method for adjusting p-values. See p.adjust for available options.

Details

The Means_DDCt function calculates fold change (FC) values using estimated marginal means derived from a fitted model. For ANOVA models, FC values can be obtained for main effects, interactions, and sliced (simple) effects. For ANCOVA models returned by the rtpcr package, only simple effects are supported.

Internally, this function relies on the emmeans package to compute marginal means and contrasts, which are then back-transformed to fold change values using the \Delta \Delta C_T framework.

Value

A data frame containing estimated fold change values, confidence intervals, p-values, and significance levels derived from the fitted model.

Author(s)

Ghader Mirzaghaderi

Examples


# Obtain a fitted model from ANOVA_DDCt
res <- ANOVA_DDCt(
  data_3factor,
  numberOfrefGenes = 1,
  mainFactor.column = 1,
  block = NULL
)

# Fold change values for Type main effect
Means_DDCt(res$lm_ANOVA, specs = "Type")

# Fold change values for Concentration main effect
Means_DDCt(res$lm_ANOVA, specs = "Conc")

# Fold change values for Concentration sliced by Type
Means_DDCt(res$lm_ANOVA, specs = "Conc | Type")

# Fold change values for Concentration sliced by Type and SA
Means_DDCt(res$lm_ANOVA, specs = "Conc | Type * SA")

rtpcr documentation built on Dec. 19, 2025, 5:07 p.m.