0

I have a dataset to perform glm function as below, but it shows an error message:

Error in eval(family$initialize) : y values must be 0 <= y <= 1

'data.frame':   189 obs. of  10 variables:
 $ class      : int  1 1 1 1 1 1 1 1 1 1 ...
 $ age        : int  3 5 4 5 3 3 5 4 3 5 ...
 $ menopause  : int  3 1 3 1 3 3 2 1 3 2 ...
 $ tumor-size : int  4 3 5 4 4 1 2 5 6 6 ...
 $ inv-nodes  : int  1 1 1 1 1 1 1 1 1 1 ...
 $ node-capes : int  1 1 1 1 1 1 1 1 1 1 ...
 $ deg-malig  : int  2 2 2 1 2 3 1 3 3 1 ...
 $ breast     : int  2 2 1 1 2 1 1 1 1 1 ...
 $ breast-quad: int  5 3 2 2 3 1 5 5 3 2 ...
 $ irradiat   : int  5 3 2 2 3 1 5 5 3 2 ...

1 Answers1

0

This question ia already answered here

Try as.factor() for your dependent variable. In logistic regression you need to have dependent variable in binary form. Which, perhaps, is not declared in R yet.