dspline {MBNMAdose} | R Documentation |
Spline dose-response functions
Description
Used to fit B-splines, natural cubic splines, and piecewise linear splines(Perperoglu et al. 2019).
Usage
dspline(
type = "bs",
knots = 1,
degree = 1,
beta.1 = "rel",
beta.2 = "rel",
beta.3 = "rel",
beta.4 = "rel"
)
Arguments
type |
The type of spline. Can take |
knots |
The number/location of spline internal knots. If a single number is given it indicates the number of knots (they will be equally spaced across the range of doses for each agent). If a numeric vector is given it indicates the location of the knots. |
degree |
The degree of the piecewise B-spline polynomial - e.g. |
beta.1 |
Pooling for the 1st coefficient. Can take |
beta.2 |
Pooling for the 2nd coefficient. Can take |
beta.3 |
Pooling for the 3rd coefficient. Can take |
beta.4 |
Pooling for the 4th coefficient. Can take |
Value
An object of class("dosefun")
Dose-response parameters
Argument | Model specification |
"rel" | Implies that relative effects should be pooled for this dose-response parameter separately for each agent in the network. |
"common" | Implies that all agents share the same common effect for this dose-response parameter. |
"random" | Implies that all agents share a similar (exchangeable) effect for this dose-response parameter. This approach allows for modelling of variability between agents. |
numeric() | Assigned a numeric value, indicating that this dose-response parameter should not be estimated from the data but should be assigned the numeric value determined by the user. This can be useful for fixing specific dose-response parameters (e.g. Hill parameters in Emax functions) to a single value. |
When relative effects are modelled on more than one dose-response parameter,
correlation between them is automatically estimated using a vague inverse-Wishart prior.
This prior can be made slightly more informative by specifying the scale matrix omega
and by changing the degrees of freedom of the inverse-Wishart prior
using the priors
argument in mbnma.run()
.
References
Perperoglu A, Sauerbrei W, Abrahamowicz M, Schmid M (2019). “A review of spline function procedures in R.” BMC Medical Research Methodology, 19(46), 1-16. doi:10.1186/s12874-019-0666-3.
Examples
# Second order B spline with 2 knots and random effects on the 2nd coefficient
dspline(type="bs", knots=2, degree=2,
beta.1="rel", beta.2="rel")
# Piecewise linear spline with knots at 0.1 and 0.5 quantiles
# Single parameter independent of treatment estimated for 1st coefficient
#with random effects
dspline(type="ls", knots=c(0.1,0.5),
beta.1="random", beta.2="rel")