plotSubGroups {longitudinalData}R Documentation

~ Function: plotSubGroups for LongData ~

Description

Plot the trajectories of all the subgroups on several graph (one on each graph) of an object LongData relativly to a Partition. This function can plot the individual trajectories, the mean trajectories or both.

Usage

plotSubGroups(x, y, ...)

Arguments

x [LongData]: Object containing the trajectories to plot.
y [Partition]: Give the Partition used to color the individual trajectories. If y is missing, a Partition with a single cluster is considered.
... Graphical parameters to be passed to methods (see plot). For LongData object specificly :
    subGroups
    [vector(character)]: which subGroups of the Partition should be ploted ? By default, all are selected.
    type
    [character]: what type of plot should be drawn for the individual trajectories.
    type.mean
    [character]: what type of plot should be drawn for the mean trajectories.
    col
    [character], [numeric] or vector[numeric]: Specification of the ploting color of the individual trajectories. In addition to the standard possibles values, col="clusters" can be use to color the individual trajectories according to their clusters.
    col.mean
    [character], [numeric] or vector[numeric]: Specification of the ploting color of the mean trajectories. In addition to the standard possibles values, col="clusters" can be use to color each mean trajectories according to its clusters.
    lty
    [character]: the line type for the individual trajectories.
    lty.mean
    [character]: the line type for the mean trajectories.
    pch
    [character]: specify the symbol to be used as plotting point on the individual trajectories.
    pch.mean
    [character]: specify the symbol to be used as plotting point on the mean trajectories. Option pch.mean="symbols" or pch.mean="letters" can be used.
    pch.time
    [vector(numeric)]: precise the time at which a point should be plot (usefull if there is a important number of time).
    cex.mean
    [numeric]: The magnification to be used for the symbol used as plotting point for the mean trajectories.
    legends
    [logical]: print the percent of individual in each groups.
    minSize
    [numeric]: minimum number of non missing value that an individual trajectories must contain to be drawn.

Details

Plot the trajectories of all the subgroups on several graph (one on each graph) of an object LongData relativly to a Partition. This function can plot the individual trajectories, the mean trajectories or both. Some graphical parameters are available twice, once for the individual trajectories (like type or col), once for the mean trajectories (like type.mean or col.mean).

Author(s)

Christophe Genolini
PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health
INSERM U669 / Maison de Solenn / Paris

Contact author : <genolini@u-paris10.fr>

See Also

LongData,plot(LongData)

Examples

#############
### Building data
ld <- gald()
par(ask=TRUE)

### Default ploting
plotSubGroups(ld)

### Only the trajectories in black
plotSubGroups(ld,col=1,type.mean="n")

### Plot according to a partition
###   (regular plot, then plotSubGroups
part <- partition(clusters=rep(LETTERS[1:4],each=50),nbClusters=4)
plot(ld,part,type.mean="n")
plotSubGroups(ld,part,type.mean="n")

### Only the mean trajectories, with letters (for publication ?)
plotSubGroups(ld,part,type="n",col.mean=1,size=2)

### All at once.
plotSubGroups(ld,part)

par(ask=FALSE)

[Package longitudinalData version 0.5 Index]