mixedModelDE {GeomxTools} | R Documentation

## Run a mixed model on GeoMxSet

### Description

Run a mixed model on GeoMxSet

### Usage

    mixedModelDE(
      object,
      elt = "exprs",
      modelFormula = NULL,
      groupVar = "group",
      nCores = 1,
      multiCore = TRUE,
      pAdjust = "BY",
      pairwise = TRUE
    )

### Arguments

`object` | name of the object class to perform QC on NanoStringGeoMxSet, use the NanoStringGeoMxSet class
`elt` | assayDataElement of the geoMxSet object to run the DE on
`modelFormula` | formula used in DE, if null, the design(object) is used
`groupVar` | = "group", sample annotation to group the data for comparing means
`nCores` | = 1, number of cores to use, set to 1 if running in serial mode
`multiCore` | = TRUE, set to TRUE to use multiCore, FALSE to run in cluster mode
`pAdjust` | = "BY" method for p-value adjustment
`pairwise` | boolean to calculate least-square means pairwise differences

### Value

mixed model output list

### Examples

    datadir <- system.file("extdata", "DSP_NGS_Example_Data", package = "GeomxTools")
    demoData <- readRDS(file.path(datadir, "/demoData.rds"))
    target_demoData <- aggregateCounts(demoData)
    target_demoData <- normalize(target_demoData, norm_method="quant")
    target_demoData <- target_demoData[1:100, ]
    pData(target_demoData)[["slide"]] <-
        factor(pData(target_demoData)[["slide name"]])
    protocolData(target_demoData)[["pool_rep"]] <-
        factor(protocolData(target_demoData)[["pool_rep"]])
    mixedOutmc <- mixedModelDE(target_demoData,
                               elt = "exprs_norm",
                               modelFormula = ~ pool_rep +  (1 | slide),
                               groupVar = "pool_rep",
                               nCores = 12,
                               multiCore = TRUE,
                               pAdjust = NULL
    )

[Package GeomxTools version 2.0.0 Index]