lobraModelSelection: Evaluation of different spline variants.

Description Usage Arguments Value Examples

View source: R/train.peaksplines.R

Description

The model selection method evaluates which spline models achieve the best quality among all tested metabolites.

Usage

1
2
lobraModelSelection(selectedLDO, potentialSplines = c(), nknots = c(0, 1,
  2), splinetype = "linear", qualityMeasure = c("AIC", "BIC", "logLik"))

Arguments

selectedLDO

LDO containing all selected metabolites to be used for the model selection.

potentialSplines

Vector of all possible knots to be used for the spline modeling.

nknots

Vector of number of spline knots to be used.

splinetype

spline type default is "linear".

qualityMeasure

Vector of quality measures to be used. Possible options are "AIC", "BIC", and "logLik".

Value

square of the in put

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
 
  data(ldoExample)
  potentialSplines <- c(6,8,10,12,14,16)
  
  nknots=c(0,1, 2, 3, 4)
  splinetype="linear"
  qualityMeasure=c("AIC", "BIC", "logLik")
  components <- ldos@selectedPeaks[,"bf"]
  components <- names(components)[components]
  selectedLDO <- selectComponents(ldo, components)
  lobraModelSelectionObject<- lobraModelSelection(selectedLDO, potentialSplines, nknots, splinetype, qualityMeasure)
  # save(modelSelectionObject,file="data/modelSelectionObjectExample.RData")
  
  

ac-hauschild/LoBrA documentation built on May 26, 2019, 3:35 p.m.