betaboost {betaboost}R Documentation

Function for boosting beta regression


Wrapper function to use mode-based boosting via mboost or gamboostLSS to fit beta regression.


 betaboost(formula = NULL, phi.formula = NULL, data = list(), sl = 0.01,
           iterations = 100, form.type = c("classic", "betaboost"),
  = NULL, start.phi = NULL, 
           stabilization = c("none", "MAD", "L2"), 
           y = NULL, x = NULL, mat.parameter = c("mean", "both"), 
           mat.effect = c("linear", "smooth"),    ...)



description of the model to be fit for location parameter (mu).


description of the model to be fit for precision parameter (phi).


a data frame containing the variables.


number of boosting iterations to be used.


step-length, default is 0.01


formula type: either gamboost (y ~ bols(x1) + bbs(x2)) using the mboost interface for specifying base-learners, or classic (y ~ x1 + s(x2)).

offset value for mu, must be > 0 and < 1; will be estimated from the outcome if none is specified (default).


offset value for phi, must be > 0; will be estimated from the outcome if none is specified (default).


governs if the negative gradient should be standardized in each boosting step. It can be either "none", "MAD" or "L2". Only applicable when besides mu also phi is modeled (extended beta regression).


response vector when no formula is specified.


matrix of explanatory variables when no formula is specfied, per default they are included as linear effects: can be changed to smooth via mat.effects.


controls what type of effect the entries in matrix x have on the response. It can be either linear or smooth, while linear is the default. Only applicable if no formula is provided, but y and x.


controls for which parameters the entries in matrix x are included. It can be either mean (classical beta regression) or both (extended beta regression), while mean is the default. Only applicable if no formula is provided, but y and x.


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.

See Also

The original function gamboostLSS and gamboost from the model-based boosting framework.


#---------- data example 


## Model for mu  
b1 <- betaboost(formula = QoL ~ arm + pain, data = QoLdata, 
                iterations = 500)

# Coeficients
coef(b1, off2int = TRUE)

# Phi

## 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

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)

# 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")          

[Package betaboost version 1.0.1 Index]