d1_plot: Main plotting function

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Main plotting function in MixfMRI.

Usage

1
2
3
4
5
6
7
8
  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.

Details

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

Value

Return plots.

Author(s)

Wei-Chen Chen and Ranjan Maitra.

References

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

See Also

set.global().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
library(MixfMRI, quietly = TRUE)
set.seed(1234)
  

  ### 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")

MixfMRI documentation built on April 26, 2018, 5:03 p.m.