return.reg.spline.fit | R Documentation |
Code for adaptively spacing knots for a given covariate.
return.reg.spline.fit(
response,
explanatory,
degree,
minKnots,
maxKnots,
startKnots,
gap,
winHalfWidth,
fitnessMeasure = "BIC",
maxIterations = 100,
initialise = TRUE,
initialKnots = NULL,
baseModel = NULL,
bd,
spl,
interactionTerm = interactionTerm,
cv.opts,
splineParams,
printout
)
response |
vector of response data for the modelling process |
explanatory |
vector of covariate to find knots for |
degree |
degree of the spline to be used |
minKnots |
minimum number of knots to fit |
maxKnots |
maximum number of knots to fit |
startKnots |
number of equally spaced knots to start with (between minKnots and maxKnots) |
gap |
minimum gap between knots (in unit of measurement of |
winHalfWidth |
Half-width of window used to calculate region with biggest average residual magnitude |
fitnessMeasure |
(default=BIC). Measure used to evaluate the fit. Other options are AIC, AICc, BIC, QAIC, QAICc, QBIC (Quasi-Likelihood Information Criterion with log(n) penalty), k-fold cross-validation ( |
maxIterations |
exchange/improve heuristic will terminate after |
initialise |
(default = TRUE). Logical stating whether or not to start with equally spaced knots (TRUE) or user specified locations (FALSE) |
initialKnots |
If |
baseModel |
starting model for SALSA to use. Must not contain the covariate in |
bd |
the x-coordinate of the boundary knots of |
spl |
"bs" uses b-spline, "cc" uses cyclic cubic, "ns" uses natural cubic spline for fitting smooth to |
interactionTerm |
character stating the variable to use as an interaction |
cv.opts |
A list object containing options for |
printout |
A logical stating whether analysis information is printed in the workspace or into a logfile (TRUE) or not at all (FALSE) |
suppress.printout |
|
Cameron Walker, Department of Engineering Science, University of Auckland, University of Auckland), Lindesay Scott-Hayward (University of St Andrews)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.