Skip to content
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

Dependent Variable as Factor Crashes Model #10

Open
BradSegal opened this issue Aug 1, 2019 · 0 comments
Open

Dependent Variable as Factor Crashes Model #10

BradSegal opened this issue Aug 1, 2019 · 0 comments

Comments

@BradSegal
Copy link

BradSegal commented Aug 1, 2019

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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant