If you want to use -mlogit- instead of Pearson chi square tests to determine the significance of these variables one at a time, the code is not much different:
I used msgtyp 2 as the base category for the outcome, just as you did earlier, so you can compare these results to your original efforts.
This will identify which variables are univariately significant as predictors of msgtyp using -mlogit-. The results should not be much different, if at all, from what you already have based on the chi sqsuare test.
And, again, there is no guarantee that when you then use all of these variables (or your favorite 15) together that all, or even any, will retain individual statistical significance.
Code:
set more off // INITIALIZE LOCAL MACRO LISTING SIGNIFICANT RESULTS // AS EMPTY local significant foreach v of varlist gender-fir { mlogit msgtyp i.`v', baseoutcome(2) // CHECK SIGNIFICANCE OF RESULTS // IF SIGNIFICANT, ADD `v' TO LIST if e(p) < 0.1 { // NOTE e(p), NOT r(p) THIS TIME local significant `significant' `v' } } // SHOW THE RESULTS display as text "The following variables have p < 0.1: " display as result "`significant'
This will identify which variables are univariately significant as predictors of msgtyp using -mlogit-. The results should not be much different, if at all, from what you already have based on the chi sqsuare test.
And, again, there is no guarantee that when you then use all of these variables (or your favorite 15) together that all, or even any, will retain individual statistical significance.
Comment