I am having issues getting kernelboot to work with data frames containing factor variables. This is true even when the model formula being fit only uses numeric variables.
Here is a simple reproducible example, trying both the default bw.silv and trying bw.nrd0
f <- function(dat){coef(lm(Sepal.Width ~ . , data = dat))}
kernelboot(iris, f, ignore = "Species")
**Error in bw.silv(data) : all columns need to be numeric**
kernelboot(iris, f, ignore = "Species", bw = "nrd0")
**Error in is.data.frame(x) : (list) object cannot be coerced to type 'double'**
The same occurs when omitting the factor variable from the model formula.
f <- function(dat){coef(lm(Sepal.Width ~ . -Species, data = dat))}
kernelboot(iris, f, ignore = "Species")
**Error in bw.silv(data) : all columns need to be numeric**
kernelboot(iris, f, ignore = "Species", bw = "nrd0")
**Error in is.data.frame(x) : (list) object cannot be coerced to type 'double'**
I am having issues getting kernelboot to work with data frames containing factor variables. This is true even when the model formula being fit only uses numeric variables.
Here is a simple reproducible example, trying both the default bw.silv and trying bw.nrd0
The same occurs when omitting the factor variable from the model formula.