Error: Linear Regression - Bootstrapping not working due to "0 (non-NA) cases"

Viewed 12

I want to bootstrap my data, as it is right skewed. when I want to bootstrap, I always get the same error.

  1. Error in Boot.lm(m1, R = 5000) : The Boot function in the 'car' package does not allow missing values for lm or glm models. Refit your model with rows with missing values removed. If you have a data frame called 'd', then the argument data=na.omit(d) is likely to work.
  2. when I use that "daten1=na.omit(daten)", I get this error message and I do not no how to process it " 0 (non-NA) cases"

can somebody help?

my code for bootstrapping

install.packages(carData)
library(car)

daten <- read.csv(filename)
set.seed(123)
daten1=na.omit(daten)
m1 <- lm(y ~ x1+x2+x3, data = daten1)

fit_m1 <- Boot(m1, R=5000)
confint(fit_m1, level = .095)


0 Answers
Related