MixfMRI (version 0.1-0)

Plotting: 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 fclust().

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.

Value

Return plots.

Details

These are example functions to plot results, simulations, and datasets.

References

http://maitra.public.iastate.edu/

See Also

set.global().

Examples

Run this code
# NOT RUN {
library(MixfMRI, quietly = TRUE)
set.seed(1234)
  
# }
# NOT RUN {
  ### 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")
# }

Run the code above in your browser using DataLab