Numerical derivatives and integrals of functions bs()
and ns()
at their first argument.
dns(x, df = NULL, knots = NULL, intercept = FALSE,
Boundary.knots = range(x), eps = 1e-03)dbs(x, df = NULL, knots = NULL, intercept = FALSE,
Boundary.knots = range(x), eps = 1e-03)
ins(x, df = NULL, knots = NULL, intercept = FALSE,
Boundary.knots = range(x), from = 0, weight.fun = NULL, …)
ibs(x, df = NULL, knots = NULL, intercept = FALSE,
Boundary.knots = range(x), from = 0, weight.fun = NULL, …)
see the help pages of functions ns()
and bs()
.
a numeric scalar denoting the step length for the central difference approximation, which calculates the derivative.
a numeric scalar denoting the lower limit of the integral.
a function to applied as weights.
extra arguments passed to weight.fun
.
an object of class dns
, dbs
, ins
or ibs
.
# NOT RUN {
x <- rnorm(10)
dns(x, df = 4)
ins(x, df = 4)
# }
Run the code above in your browser using DataLab