trajplot {BCClong}R Documentation

Trajplot for fitted model

Description

plot the longitudinal trajectory of features by local and global clusterings

Usage

trajplot(
  fit,
  feature.ind = 1,
  which.cluster = "global.cluster",
  title = NULL,
  ylab = NULL,
  xlab = NULL,
  color = NULL
)

Arguments

fit

an objective output from BCC.multi() function

feature.ind

a numeric value indicating which feature to plot. The number indicates the order of the feature specified in mydat argument of the BCC.multi()() function

which.cluster

a character value: "global" or "local", indicating whether to plot the trajectory by global cluster or local cluster indices

title

Title for the trace plot

ylab

Label for y axis

xlab

Label for x axis

color

Color for the trajplot

Value

void function with no return value, only show plots

Examples

# get data from the package
filePath <- system.file("extdata", "epil1.rds", package = "BCClong")
fit.BCC <- readRDS(filePath)
# for local cluster
trajplot(fit=fit.BCC,feature.ind=1, which.cluster = "local.cluster",
         title= "Local Clustering",xlab="time (months)",
         ylab="anxiety",color=c("#00BA38", "#619CFF"))

# for global cluster
trajplot(fit=fit.BCC,feature.ind=1,
         which.cluster = "global.cluster",
         title="Global Clustering",xlab="time (months)",
         ylab="anxiety",color=c("#00BA38", "#619CFF"))


[Package BCClong version 1.0.2 Index]