Optimal_knot_research: Optimal Research B-Spline Internal Knots

Description Usage Arguments Value See Also

View source: R/Optimal_knot_research.R

Description

This function uses AIC criterion to estimate optimal position and number of knots by fitting free-knot splines to data with one independent and one dependent variable. It is assumed that knots are estimated for least-squares splines with no penalty using genetic algorithm.

Usage

1
2
3
4
Optimal_knot_research(
  data,degree = 3,minknot = 2,maxknot = 2,
  criteria = "AIC",...
)

Arguments

data

a data frame containing the independent variable (y) and the dependent one (x).

degree

an integer scalar indicating the degree of the spline it. By default, this value is fixed at 3

minknot

an integer scalar indicating the minimum number of knots to consider. By default, this variable is fixed at 2

maxknot

an integer scalar indicating the maximum number of knots to consider. By default, this variable is fixed at 2.

criteria

a character varaiable indicating the criterion to be used for determining the number and the positions of knots. Choices are "AIC" for Akaike information criterion (by default), "AICc" for corrected AIC, "BIC" for Bayesian information criterion, "adjAIC" for an adjusted version of AIC, "GCV" for generalized cross-validation and "adjGCV" for an adjusted version of GCV.

...

Further arguments to be passed (see freeknotfit for more details).

Value

A numerical vector of optimal knots whose number can varied from minknot to maxknot

See Also

freeknotfit for more details about the method.


marie-alexandre/AUCcomparison documentation built on Dec. 21, 2021, 1:52 p.m.