I have a set of data, that gives the length of a species of abalone, and its corresponding type (male, M, female, F, or infant, I). (https://archive.ics.uci.edu/ml/datasets/abalone)
I have constructed a logistic regression to create a model that will determine whether the abalone is M/F or I, given the length. (M and F are classed as the same.)
So I write the following in R to generate and test the model on data points:
g <- glm(sex ~ length, family="binomial") pairs <- paste(round(predict(g, type="response")), sex) table(pairs)
The output table is:
pairs 0 F 0 I 0 M 1 F 1 I 1 M 218 6 210 1089 1336 1318
How can I correctly interpret this?
These are the options I have come up with:
1089 females correctly identified, 218 females incorrectly identified; 1318 males correctly identified, 210 males incorrectly identified; 1336 infants correctly identified, 6 incorrectly identified.
218 females correctly identified, 6 infants and 210 males incorrectly identified; 1089 females incorrectly identified, 1336 infants and 1318 males incorrectly identified.