kascegenerator.blogg.se

Logistic regression sas jmp
Logistic regression sas jmp





If species_ori < species_pre then delete If species_ori > species_pre then delete *Compare the original species and the predict species and reserve the If P_virginic > P_setosa and P_virginic > P_versicol then species_pre=3 If P_versicol > P_setosa and P_versicol > P_virginic then species_pre=2 If P_setosa > P_versicol and p_setosa > P_virginic then species_pre=1 *Choose the highest probability of three speices as the final result*/ If species = 'virginic' then species_ori=3 If species = 'versicol' then species_ori=2

logistic regression sas jmp

If species = 'setosa' then species_ori=1 *Labe the original species into 1(setosa), 2(versicolor), 3(virginica)Īnd generate a new variable species_orei to save that label*/ Good performance! /*Test the accuracy of our model on the test set*/

logistic regression sas jmp logistic regression sas jmp

Each predicted species probability is between 0 and 1, hence we regard the highest probability one as its species.Ĭompared to the true species situation, we compute the accuracy rate which is 1. Through the p-values, we can see all of the coefficients of the first model(setosa vs. virginica) are not significant while some of the coefficients of the second model(versicolor vs. virginica) are significant.īased on the fitted model, now we can predict the each species probability of the testing data set. During the operation, one of the categories is considered as the reference(base) category, and then the other k-1 categories and the reference(base) category we choose are respectively regression.In this way, if we choose the result K as the main category, we can get the following formula: The way to implement the multi-category logistic regression model is to run K-1 independent binary logistic regression model for all K possible classification results. The following is a brief summary of the multinomial logistic regression(All vs Reference).







Logistic regression sas jmp