Description Usage Arguments Details Value References See Also Examples
Wrapper function to use mode-based boosting via mboost or gamboostLSS to fit beta regression.
1 2 3 4 5 6 |
formula |
description of the model to be fit for location parameter ( |
phi.formula |
description of the model to be fit for precision parameter ( |
data |
a data frame containing the variables. |
iterations |
number of boosting iterations to be used. |
sl |
step-length, default is 0.01 |
form.type |
formula type: either |
start.mu |
offset value for |
start.phi |
offset value for |
stabilization |
governs if the negative gradient should be standardized in each boosting step. It can be either |
y |
response vector when no |
x |
matrix of explanatory variables when no |
mat.effect |
controls what type of effect the entries in matrix |
mat.parameter |
controls for which parameters the entries in matrix |
... |
Additional arguments passed to mboost or gamboostLSS fitting functions. |
A wrapper function to fit beta regression via different boosting functions.
A boosting object.
Mayr A, Weinhold L, Hofner B, Titze S, Gefeller O, Schmid M (2018). The betaboost package - a software tool for modeling bounded outcome variables in potentially high-dimensional data. International Journal of Epidemiology, doi: 10.1093/ije/dyy093.
Schmid M, Wickler F, Maloney KO, Mitchell R, Fenske N, & Mayr A. (2013). Boosted beta regression. PLoS ONE, 8(4), e61623.
The original function gamboostLSS
and gamboost
from the model-based boosting framework.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #---------- data example
data(QoLdata)
## Model for mu
b1 <- betaboost(formula = QoL ~ arm + pain, data = QoLdata,
iterations = 500)
# Coeficients
coef(b1, off2int = TRUE)
# Phi
nuisance(b1)
## Model for mu and phi
b2 <- betaboost(formula = QoL ~ arm + pain, data = QoLdata,
iterations = 1000,
phi.formula = QoL ~ arm + pain)
# Coeficients
coef(b2, off2int = TRUE)
#--------- simple simulated example
require(gamlss.dist)
set.seed(1234)
x1 <- rnorm(100)
x2 <- rnorm(100)
x3 <- rnorm(100)
x4 <- rnorm(100)
y <- rBE(n = 100, mu = plogis(x1 + x2),
sigma = plogis(x3 + x4))
data <- data.frame(y ,x1, x2, x3, x4)
data <- data[!data$y %in% c(0,1),]
# 'classic' beta regression
b3 <- betaboost(formula = y ~ x1 + x2, data = data,
iterations = 120)
coef(b3)
# beta regression including modeled precision parameter
b4 <- betaboost(formula = y ~ x1 + x2,
phi.formula = y ~ x3 + x4,
data = data, iterations = 120)
# with smooth effects for x1 and x3
b5 <- betaboost(formula = y ~ s(x1) + x2,
phi.formula = y ~ s(x3) + x4, form.type = "classic",
data = data, iterations = 120)
# using matrix interface
b6 <- betaboost(y = data$y, x = data[,2:5], iterations = 200,
mat.parameter = "both")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.