I have an imbalanced data set containing 12% of the positive class 88% negative. First, I ran a logistic regression with all my coefficients and got an average accuracy of 0.91 (I know that's not quite good given my class distribution), average sensitivity of 0.34 and average specificity of 0.97. Then I ran an additional logistic regression only using a subset of the coefficients. On average, I got higher accuracy, that is 0.98, lower sensitivity 0.32 and higher specificity, i.e. 0.98 . Is this quite normal or an error in my code? Or is it because of the class distribution, that the classifier using more coefficients is even better in predicting the majority class but worse in predicting the minority class?
This is a classic example of the harm caused by the use of a discontinuous improper scoring rule. A simpler example is shown in the Information Loss chapter in Biostatistics for Biomedical Research, available from http://biostat.mc.vanderbilt.edu/ClinStat. Not only can classification "accuracy" do this it can sometimes tell you that using predictors is worse than just using the overall average risk to predict every subject's outcome. Sensitivity and specificity are also improper accuracy scores and are discussed at length in the Diagnosis chapter of the same notes.
Logistic regression was never intended to be used for the crude and arbitrary task of classification. It is a direct probability model.