| meansTest-methods {Cardinal} | R Documentation |
Performs hypothesis testing for imaging experiments by fitting linear mixed models to summarizations or segmentations.
## S4 method for signature 'SparseImagingExperiment'
meansTest(x, fixed, random, groups = run(x),
BPPARAM = getCardinalBPPARAM(), ...)
## S4 method for signature 'SparseImagingExperiment'
segmentationTest(x, fixed, random, groups = run(x),
classControl = c("Ymax", "Mscore"),
BPPARAM = getCardinalBPPARAM(), ...)
## S4 method for signature 'SpatialDGMM'
segmentationTest(x, fixed, random, model = modelData(x),
classControl = c("Ymax", "Mscore"),
BPPARAM = getCardinalBPPARAM(), ...)
## S4 method for signature 'MeansTest'
summary(object, ..., BPPARAM = getCardinalBPPARAM())
## S4 method for signature 'SegmentationTest'
summary(object, ..., BPPARAM = getCardinalBPPARAM())
x |
An imaging dataset or segmented/summarized imaging dataset. |
fixed |
A one-sided formula giving the fixed effects of the model on the RHS. The response will added to the LHS, and the formula will be passed to the underlying modeling function. |
random |
A one-sided formula giving the random effects of the model on the RHS. See |
groups |
The summarization units. Pixels from different groups will be segmented/summarized separately. Each distinct observational unit (e.g., tissue sample) should be assigned to a unique group. |
model |
An integer vector or |
classControl |
Either the method used to match segmented classes to the fixed effects, or a list where each element is a vector of name-value pairs giving the mapping between groups and classes (e.g., c(group1=class1, group2=class2, ...)). For automated matching methods, 'Ymax' means to use the classes with the highest mean response for each group, and 'Mscore' means to select classses based on a match score quantifying the overlap between classes and fixed effects. |
... |
Passed to internal linear modeling methods. |
object |
A fitted model object to summarize. |
BPPARAM |
An optional instance of |
An object of class MeansTest or SegmentationTest, which is a ImagingResult, where each element of the resultData slot contains at least the following components:
Dan Guo and Kylie A. Bemis
lm, lme,
spatialDGMM
set.seed(1)
x <- simulateImage(preset=4, nruns=3, npeaks=10,
dim=c(10,10), peakheight=5, peakdiff=2,
representation="centroid")
groups <- replace(run(x), !(x$circleA | x$circleB), NA)
fit <- meansTest(x, ~ condition, groups=groups)
summary(fit)