# DerivIntSplines: Derivatives and Integrals of B-splines and Natural Cubic... In drizopoulos/JM: Joint Modeling of Longitudinal and Survival Data

## Description

Numerical derivatives and integrals of functions `bs()` and `ns()` at their first argument.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```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, ...) ```

## Arguments

 `x, df, knots, intercept, Boundary.knots` see the help pages of functions `ns()` and `bs()`. `eps` a numeric scalar denoting the step length for the central difference approximation, which calculates the derivative. `from` a numeric scalar denoting the lower limit of the integral. `weight.fun` a function to applied as weights. `...` extra arguments passed to `weight.fun`.

## Value

an object of class `dns`, `dbs`, `ins` or `ibs`.

## Author(s)

Dimitris Rizopoulos [email protected]

## Examples

 ```1 2 3``` ```x <- rnorm(10) dns(x, df = 4) ins(x, df = 4) ```

drizopoulos/JM documentation built on Sept. 29, 2018, 3:25 a.m.