Dependent Variable as Factor Crashes Model
BradSegal opened this issue · 0 comments
BradSegal commented
Attempting to run a parglm for a model with the output configured as factors fails to run correctly and produces the following error:
Error in Summary.factor(c(
1= NaN,
2= NaN,
3= NaN,
4 = NaN, : ‘sum’ not meaningful for factors In addition: Warning messages: 1: In Ops.factor(y, mu) : ‘-’ not meaningful for factors 2: In Ops.factor(weights, y) : ‘*’ not meaningful for factors
Running the same model with speedglm or glm doesn't return an error
Dataset <- data.frame(
y = c(0,1,1,0,0,0,0,0,1),
lot1 = c(118,58,42,35,27,25,21,19,18),
lot2 = c(69,35,26,21,18,16,13,12,12))
Dataset$y <- factor(Dataset$y)
parglm(y ~ . , data = Dataset, family = "binomial", control = parglm.control((nthreads = 4L)))
speedglm(y ~ . , data = Dataset, family = binomial())
glm(y ~ . , data = Dataset, family = "binomial")