R glm get class of Y
I am using R for logistic regression. I am using code from the page
[http://www.ats.ucla.edu/stat/r/dae/logit.htm]. I fitted a model as below.
mydata <- read.csv("http://www.ats.ucla.edu/stat/data/binary.csv")
mylogit <- glm(admit ~ gre, data = mydata, family = "binomial")
i want to find classes predicted for each data point of the training data.
What command should i use? i tried below command but it didnt return what
i was looking for. i also read help but didnt understand output given by
below command :(.
mylogit$fitted.values
Moreover as column 'admit' has 127 1's. Shouldnt accuracy of logistic
regression better than or equal to that?
No comments:
Post a Comment