CluMP_view {CluMP} | R Documentation |

## Cluster profiles' (CluMP results) visualisation

### Description

This graphical function enables to visualise cluster profiles (mean representatives of each cluster). Available are three types of plots: non-parametric (LOESS method for small/medium or GAM method for complex data of large size. Both methods are applied from ggplot2 representatives (mean within-cluster trajectories) with/without all individual (original) trajectories, and nonparametric mean trajectories with error bars.

### Usage

```
CluMP_view(
CluMPoutput,
type = "all",
nb_intervals = NULL,
return_table = FALSE,
title = NULL,
x_title = NULL,
y_title = NULL,
plot_NA = FALSE
)
```

### Arguments

`CluMPoutput` |
An object (output) from the |

`type` |
String. Indicates which type of graph is required. Possible values for this argument are: |

`nb_intervals` |
An integer, positive number (scalar) specifying the number of regular timepoints into which should be follow-up period split. This argument works only with graph type = |

`return_table` |
Logical scalar indicating if the summary table of plotted values in the graph of type = |

`title` |
String. Optional title for a plot. If undefined, no title will used. |

`x_title` |
String. An optional title for |

`y_title` |
String. An optional title for |

`plot_NA` |
Plot |

### Value

Returns graph for type *"all"* and *"cont"* or (list with) graph and table of mean trajectories (if specified) for type = *"breaks"*.

### Examples

```
set.seed(123)
dataMale <- GeneratePanel(n = 50, Param = ParamLinear, NbVisit = 10)
dataMale$Gender <- "M"
dataFemale <- GeneratePanel(n = 50, Param = ParamLinear, NbVisit = 10)
dataFemale$ID <- dataFemale$ID + 50
dataFemale$Gender <- "F"
data <- rbind(dataMale, dataFemale)
CluMPoutput <- CluMP(formula = Y ~ Time, group = "ID", data = data, cl_numb = 3)
title <- "Plotting clusters' representatives with error bars"
CluMP_view(CluMPoutput, type = "all" , return_table = TRUE)
CluMP_view(CluMPoutput, type = "cont")
CluMP_view(CluMPoutput, type = "breaks", nb_intervals = 5, return_table=TRUE, title = title)
```

*CluMP*version 0.8.1 Index]