Learn R Programming

MRIaggr (version 1.1.5)

plotCv_fMM: Graphical display of the convergence criteria

Description

Graphical display of the convergence criteria using the result of fMMalgo algorithm.

Usage

plotCv_fMM(res.EM, window=FALSE,
    filename="EM.traceLv", width=480, height=480, path=NULL, unit="px", res=NA)

Arguments

res.EM
The result of the fMMalgo or the launcher_fMM function.
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.

Value

  • A list containing :
  • diff_lva vector indicating the evolution of the likelihood between two consecutive steps.
  • test.croissancea logical testing the monotonicity of the likelihood across steps.
  • diff_lv_completeea vector indicating the evolution of the completed likelihood between two consecutive steps.
  • test.croissance_completeea logical testing the monotonicity of the completed likelihood across steps.

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})

plotCv_fMM(res_EMbase)

Run the code above in your browser using DataLab