Nussbaum Madlene
2015-Mar-13 13:17 UTC
[R] mboost: Proportional odds boosting model - how to specify the offset?
Dear R team
The package mboost allows for boosting of proportional odds models.
However, I would like to include an offset for every observation. This
produces an error - no matter how I put the offset (as response
probabilities or as response link).
Fitting gamboost-models with offset works satisfactory with family =
Gaussian() or Multinomial().
Questions:
1) How do I need to specify the offset with family = PropOdds()?
2) Where in the mboost-object do I find the Theta's (response category
dependent intercept)?
# --- minimal example with iris data ---
library(MASS)
library(mboost)
data(iris)
iris$Species <- factor(iris$Species, ordered = T)
p.iris <- polr(Species ~ Sepal.Length, data = iris)
mlp <- gamboost(Species ~ bols(Sepal.Length) + bols(Sepal.Width),
data = iris, family = PropOdds(),
offset = fitted(p.iris) )
Error in tmp[[i]] : subscript out of bounds
Thank you
M. Nussbaum
--
ETH Z?rich
Madlene Nussbaum
Institut f?r Terrestrische ?kosysteme
Boden- und Terrestrische Umweltphysik
CHN E 37.2
Universit?tstrasse 16
CH-8092 Z?rich
Telefon + 44 632 73 21
Mobile + 79 761 34 66
madlene.nussbaum at env.ethz.ch
www.step.ethz.ch