View source: R/trajeRmodelSelection.R
| trajeRSH | R Documentation |
Applies the slope heuristic (from the 'capushe' package) to a list of 'trajeR' models to select the best one.
trajeRSH(l)
l |
A list of trajectory objects returned by the 'trajeR' function. |
An object of class 'DDSE' from the 'capushe' package, containing the selected model and related information.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.