Learn R Programming

MRIaggr (version 1.1.5)

plotProba_fMM: Graphical display of the probability distribution by group

Description

Graphical display of the probability distribution by group using the result of fMMalgo algorithm.

Usage

plotProba_fMM(res.EM, type="posterior_proba",
    main="group", col=c("red","blue","green","yellow","purple","brown"),
    border="black", cex.main=0.75, window=FALSE,
    filename="EM.plotProb", width=480, height=480, path=NULL, unit="px", res=NA)

Arguments

res.EM
the result of the fMMalgo or the launcher_fMM function.
type
the type of proba to be display : can be "prior_proba" or "posterior_proba"
main
a main title for the plot (same as in plot.default). Default is group.
col
the colors for lines (same as in plot.default). Default is c("red","blue","green","yellow","purple","brown").
border
the color of the border around the bars (same as in hist). Default is "black".
cex.main
the magnification to be used for main titles relative to the current setting of cex. (same as in plot.default).
window
Display the graphics in the current graphics device (F), in a new device (T), or save it in a png/eps/svg file ("png" / "esp" / "png"). NULL indicates no display.
filename
Name of the file (without the extension) where the plot should be saved. character. Ignored if window is not png/eps/svg.
width
the width of the device. numeric. Ignored if window is not png/eps/svg.
height
the width of the device. numeric. Ignored if window is not png/eps/svg.
path
the directory where the plot file will be created. character. Default is NULL corresponding to the current working directory.
unit
the units in which height and width are given. Can be "px", "in", "cm" or "mm". Default is "px".
res
the nominal resolution in ppi which will be recorded in the bitmap file, if a positive integer. numeric. Default is NA.

Examples

Run this code
data(Simulation_data,package="fMMseg")

res_EMbase <- launcher_fMM(G=3,data=Simulation_data,
                          var_reg="Y",family=gaussian(link="identity"),
                          epsilon=5*10^{-3})

plotProba_fMM(res_EMbase)

Run the code above in your browser using DataLab