dfset | R Documentation |
dfset
fits a natural cubic spline for a range
of degrees of freedom, and returns the df minimising the BIC or AIC.
dfset(x, y, data = parent.frame(), FUN = BIC, df = 1:15, plot = FALSE, ...)
x |
vector of x coordinates. |
y |
vector of y coordinates. |
data |
environment containing |
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 |
degrees of freedom and value of FUN at minimum.
Tim Cole tim.cole@ucl.ac.uk
data(heights)
dfset(age, height, heights, FUN=BIC, plot=TRUE)
dfset(age, height, heights, FUN=function(a) AIC(a, k=1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.