New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing values and weights #80

carlganz opened this Issue May 22, 2017 · 1 comment


None yet
2 participants

carlganz commented May 22, 2017


I find that that when mboost subsets to remove missing values here it fails to subset the weights so the dimensions don't line up down the road.


# generate random data

weights <- sample(1:100, 100, replace=FALSE)
x <- rnorm(100)
y <- runif(100)

# create missing value
x[25] <- NA

myData <- data.frame(x=x, y=y)

# errors
  y ~ bols(x), 
  data = myData,
  weights = weights,
  family = Gaussian()

# works
  y ~ bols(x), 
  data = myData,
  weights = weights[-25],
  family = Gaussian()

# base R modeling functions subset weights
lm(y ~ x, myData, weights = weights)

Kind Regards,
Carl Ganz

@hofnerb hofnerb self-assigned this Jun 21, 2017

@hofnerb hofnerb added the bug label Jun 21, 2017


This comment has been minimized.


hofnerb commented Jun 21, 2017

You are absolutely right. Thanks for the bug report. I will immediately see how we can fix that.

@hofnerb hofnerb closed this in 6fd121e Jun 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment