Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dfset

Find degrees of freedom for a natural spline curve to minimise BIC or AIC


Description

dfset fits a natural cubic spline for a range of degrees of freedom, and returns the df minimising the BIC or AIC.

Usage

dfset(x, y, data = parent.frame(), FUN = BIC, df = 1:15, plot = FALSE, ...)

Arguments

x

vector of x coordinates.

y

vector of y coordinates.

data

environment containing x and y.

FUN

function to be minimised (e.g. BIC or AIC).

df

vector of degrees of freedom to be searched.

plot

logical controlling plotting of FUN versus df.

...

parameters to pass to plot.

Value

degrees of freedom and value of FUN at minimum.

Author(s)

Examples

data(heights)
dfset(age, height, heights, FUN=BIC, plot=TRUE)
dfset(age, height, heights, FUN=function(a) AIC(a, k=1))

sitar

Super Imposition by Translation and Rotation Growth Curve Analysis

v1.2.0
GPL (>= 2)
Authors
Tim Cole [aut, cre] (<https://orcid.org/0000-0001-5711-8200>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.