MRIaggr (version 1.1.5)

plotY_fMM: Graphical display of the mixture distribution

Description

Graphical display of the mixture distribution using the result of fMMalgo algorithm.

Usage

plotY_fMM(res.EM, prob="posterior_proba", type="density", numY=1, identifier=NULL, nclass=NULL, 
    x.legend="topright", col=NULL, main=NULL, cex.main=1, lwd=1, lwd.mean=2, lty.wmean=2, 
    window=FALSE, filename="plotY_fMM", width=480, height=480, path=NULL, unit="px", res=NA)

Arguments

res.EM
The result of the fMMalgo or the launcher_fMM function.
prob
the type of group membership : can be "group", "prior_proba" or "posterior_proba".
type
the type of plot : can be "hist" (only available if prob="group") or "density".
numY
the number of the response to be selected. integer. Default is 1.
identifier
the identifier of observation to be displayed. NULL indicates all observations.
nclass
a single number giving the number of cells for the histogram (same as in hist).
x.legend
the position of the legend by keywords (same as the x argument of legend), possible values are : "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center"
col
the colors for lines (same as in plot.default). Default is c("red","blue","green","yellow","purple","brown").
main
a main title for the plot (same as in plot.default). Default is group.
cex.main
the magnification to be used for main titles relative to the current setting of cex. (same as in plot.default).
lwd
a vector of line widths for the density lines (same as in plot.default).
lwd.mean
a vector of line widths for the mean lines (same as in plot.default).
lty.wmean
a vector of line types for the mean lines (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},iter_max=100,
                          trace_iter=FALSE)

plotY_fMM(res_EMbase)

Run the code above in your browser using DataLab