associationTest {tradeSeq} | R Documentation

## Perform statistical test to check whether gene expression is constant across pseudotime within a lineage

### Description

This test assesses whether average gene expression is associated with pseudotime.

### Usage

    associationTest(models, ...)

    ## S4 method for signature 'SingleCellExperiment'
    associationTest(models, global = TRUE, lineages = FALSE, l2fc = 0)

    ## S4 method for signature 'list'
    associationTest(models, global = TRUE, lineages = FALSE, l2fc = 0)

### Arguments

`models` | The fitted GAMs, typically the output from `fitGAM`.
`...` | parameters including:
`global` | If TRUE, test for all lineages simultaneously.
`lineages` | If TRUE, test for all lineages independently.
`l2fc` | The log2 fold change threshold to test against. Note, that this will affect both the global test and the pairwise comparisons.

### Value

A matrix with the wald statistic, the number of degrees of freedom and the p-value associated with each gene for all the tests performed. If the testing procedure was unsuccessful, the procedure will return NA.

### Examples

    set.seed(8)
    data(crv, package="tradeSeq")
    data(countMatrix, package="tradeSeq")
    sce <- fitGAM(counts = as.matrix(countMatrix),
                      sds = crv,
                      nknots = 5)
    assocRes <- associationTest(sce)

[Package tradeSeq version 1.2.01 Index]