R2.betaboost: Computing pseudo R^2 for betaboost models.

Description Usage Arguments References Examples

Description

Computes different pseudo R^2 for betaboost models

Usage

1
R2.betaboost(model, data, newdata = NULL)

Arguments

model

A boosting model object for beta regression.

data

Underlying data frame

newdata

test-data (optional), if omitted R^2 is computed on data (training-data)

References

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# 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),]
rm(x1,x2,x3,x4,y)

b1 <- betaboost(formula = y ~ x1 + x2, 
                phi.formula = y ~ x3 + x4, 
                data = data, form.type = "classic",
                iterations = 120)
R2.betaboost(b1, data = data)

betaboost documentation built on May 2, 2019, 7:28 a.m.