Plotting {MixfMRI} | R Documentation |
Main plotting function
Description
Main plotting function in MixfMRI.
Usage
plotfclust(da, posterior, main = NULL, xlim = NULL, ylim = NULL)
plotfclustpv(da, posterior, main = NULL, xlim = NULL, ylim = NULL)
plotpv(da, posterior, PARAM, zlim = c(0, 0.01), plot.mean = TRUE,
xlab = "", ylab = "", main = NULL, xlim = NULL, ylim = NULL,
col = my.YlOrRd(), ignore.bg = FALSE)
plotpvlegend(zlim = c(0, 0.01), n.level = 20, main = NULL,
col = my.YlOrRd())
Arguments
da |
a data set to be plotted. |
posterior |
a posterior data set to be plotted. |
PARAM |
a returning parameter object from |
main |
title of the plot. |
xlim |
limits of x-axis. |
ylim |
limits of y-axis. |
zlim |
limits of z-axis. |
xlab |
labels of x-axis. |
ylab |
labels of y-axis. |
plot.mean |
if plotting mean values of each cluster. |
col |
colors to be drawn. |
ignore.bg |
if ignoring the background. |
n.level |
number of levels to be plotted. |
Details
These are example functions to plot results, simulations, and datasets.
Value
Return plots.
Author(s)
Wei-Chen Chen and Ranjan Maitra.
References
Chen, W.-C. and Maitra, R. (2021) “A Practical Model-based Segmentation Approach for Accurate Activation Detection in Single-Subject functional Magnetic Resonance Imaging Studies”, arXiv:2102.03639.
See Also
set.global()
.
Examples
library(MixfMRI, quietly = TRUE)
set.seed(1234)
.rem <- function(){
### Check 2d data.
da <- pval.2d.complex
id <- !is.na(da)
PV.gbd <- da[id]
hist(PV.gbd, nclass = 100, main = "p-value")
### Test 2d data.
id.loc <- which(id, arr.ind = TRUE)
X.gbd <- t(t(id.loc) / dim(da))
ret <- fclust(X.gbd, PV.gbd, K = 3)
print(ret)
### p-values of rest clusters.
ret.lrt <- lrt(PV.gbd, ret$class, K = 3)
print(ret.lrt)
ret.lrt2 <- lrt2(PV.gbd, ret$class, K = 3)
print(ret.lrt2)
### Plotting.
par(mfrow = c(2, 2), mar = c(0, 0, 2, 0))
plotpv(da, ret$posterior, ret$param,
zlim = c(0.005, 0.008), main = "Mean of Beta Distribution")
plotpv(da, ret$posterior, ret$param,
plot.mean = FALSE, main = "p-value")
par(mar = c(5.1, 4.1, 4.1, 2.1))
plotpvlegend(zlim = c(0.005, 0.008), main = "Mean of Beta Distribution")
plotpvlegend(zlim = c(0, 0.01), main = "p-value")
}
[Package MixfMRI version 0.1-3 Index]