trajeRSH: Slope Heuristic for Trajectory Model Selection

View source: R/trajeRmodelSelection.R

trajeRSHR Documentation

Slope Heuristic for Trajectory Model Selection

Description

Applies the slope heuristic (from the 'capushe' package) to a list of 'trajeR' models to select the best one.

Usage

trajeRSH(l)

Arguments

l

A list of trajectory objects returned by the 'trajeR' function.

Value

An object of class 'DDSE' from the 'capushe' package, containing the selected model and related information.

Examples

data <- read.csv(system.file("extdata", "CNORM2gr.csv", package = "trajeR"))
degre <- list(
 c(2, 2),
 c(1, 1),
 c(1, 2),
 c(2, 1),
 c(2, 0),
 c(0, 2),
 c(3, 2),
 c(3, 1),
 c(2, 3),
 c(1, 3)
)
sol <- list()
for (i in 1:length(degre)) {
  sol[[i]] <- trajeR(
    Y = data[, 2:6], A = data[, 7:11],
    degre = degre[[i]], Model = "CNORM", Method = "EM"
  )
}
trajeRSH(sol)

trajeR documentation built on Aug. 4, 2026, 1:09 a.m.