Last chance! 50% off unlimited learning
Sale ends in
trajClusters
objectsPlots the cluster-specific median and mean trajectories and a random sample of trajectories from each cluster.
# S3 method for trajClusters
plot(x, sample.size = 5, ask = TRUE, which.plots = NULL, spline = FALSE, ...)scatterplots(x, ask = TRUE, ...)
critplot(x, ...)
object of class trajClusters
as returned by
Step3Cluster
.
the number of random trajectories to be randomly sampled
from each cluster. Defaults to 5
.
logical. If TRUE
, the user is asked before each plot. Defaults to
TRUE
.
either NULL
or a vector of integers. If NULL
, every
available plot is displayed. If a vector is supplied, only the corresponding
plots will be displayed.
logical. If TRUE
, each trajectory will be smoothed using
smoothing splines and the median and mean trajectories will be plotted from
the smoothed trajectories. Defaults to FALSE
other parameters to be passed through to plotting functions.
Step3Clusters
if (FALSE) {
data("trajdata")
trajdata.noGrp <- trajdata[, -which(colnames(trajdata) == "Group")] #remove the Group column
m = Step1Measures(trajdata.noGrp, ID = TRUE)
s = Step2Selection(m)
c3 = Step3Clusters(s, nclusters = 3)
plot(c3)
#The pointwise mean trajectories correspond to the third and fourth displayed plots.
c4 = Step3Clusters(s, nclusters = 4)
plot(c4, which.plots = 3:4)
}
Run the code above in your browser using DataLab