I am working with a data set (sample below) that contains, among other things, four binary variables (stage1 - stage4) that indicate whether or not a particular theoretical construct occurred. These are my dependent variables. It also contains sex, a binary variable of 0 for male, 1 for female, the nominal variable country (1=USA, 2=Korea, 3=Japan, 4 = Jamaica, 5=El Salvador), and the nominal variable ageGroup, which is four different age groups (given the values 1 - 4) that go with the theory. I will not be using age as a continuous variable as this would deviate from the theory.
Here is an example of my command:
Code:
mlogit stage1 i.country i.sex i.ageGroup
Code:
Iteration 0: log likelihood = -562.03133 Iteration 1: log likelihood = -486.75992 Iteration 2: log likelihood = -482.04188 Iteration 3: log likelihood = -481.81673 Iteration 4: log likelihood = -481.7736 Iteration 5: log likelihood = -481.76435 Iteration 6: log likelihood = -481.76224 Iteration 7: log likelihood = -481.76172 Iteration 8: log likelihood = -481.76162 Iteration 9: log likelihood = -481.7616 Multinomial logistic regression Number of obs = 949 LR chi2(8) = 160.54 Prob > chi2 = 0.0000 Log likelihood = -481.7616 Pseudo R2 = 0.1428 ------------------------------------------------------------------------------ stage1 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- 0 | (base outcome) -------------+---------------------------------------------------------------- 1 | country | 2 | .0704811 .2336593 0.30 0.763 -.3874827 .5284448 3 | -.1962796 .3214656 -0.61 0.541 -.8263405 .4337813 4 | .6622956 .2437347 2.72 0.007 .1845844 1.140007 5 | -.2670693 .3401934 -0.79 0.432 -.9338361 .3996976 | 1.sex | -.4274745 .1589307 -2.69 0.007 -.7389729 -.1159762 | ageGroup | 2 | 15.99886 676.7035 0.02 0.981 -1310.316 1342.313 3 | 15.08165 676.7035 0.02 0.982 -1311.233 1341.396 4 | 13.51498 676.7035 0.02 0.984 -1312.8 1339.83 | _cons | -15.59222 676.7035 -0.02 0.982 -1341.907 1310.722 ------------------------------------------------------------------------------
1) How do I run the model without using the USA and the first age group as the base? I want to be able to report the coefficients for all countries and age groups, not just what they are based on the "1" category.
2) Does this test fit? When working with a binary predictor and multiple nominal predictors, multinomial logistic regression came up, but I am going down the wrong road?
Thanks!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte age str6 gender str11 location byte(stage1 stage2 stage3 stage4) str21 know float(ageGroup country sex knowSci) 10 "Female" "NC" 1 1 1 1 "Yes" 3 1 1 1 10 "Female" "NC" 1 1 1 1 "Yes" 3 1 1 1 10 "Female" "NC" 1 0 0 0 "No" 3 1 1 0 10 "Female" "NC" 1 0 1 0 "NO DATA" 3 1 1 -1 10 "Female" "NC" 0 0 0 0 "Yes" 3 1 1 1 10 "Female" "NC" 0 1 0 0 "Yes" 3 1 1 1 10 "Female" "NC" 1 1 1 0 "Yes" 3 1 1 1 10 "Female" "NC" 0 0 1 0 "Yes" 3 1 1 1 10 "Female" "NC" 0 0 0 0 "Yes" 3 1 1 1 10 "Female" "NC" 1 0 1 1 "Yes" 3 1 1 1 10 "Female" "NC" 0 0 0 1 "Yes" 3 1 1 1 10 "Female" "NC" 0 0 1 1 "Yes" 3 1 1 1 10 "Female" "NC" 1 0 1 0 "Yes" 3 1 1 1 10 "Female" "NC" 0 0 0 1 "Yes" 3 1 1 1 10 "Female" "NC" 1 0 1 1 "Yes" 3 1 1 1 10 "Female" "NC" 0 1 1 1 "Yes" 3 1 1 1 10 "Female" "NC" 0 1 0 0 "Yes" 3 1 1 1 11 "Female" "NC" 1 0 1 0 "Yes" 3 1 1 1 11 "Female" "NC" 0 1 0 1 "Yes" 3 1 1 1 11 "Female" "NC" 1 1 1 1 "Yes" 3 1 1 1 11 "Female" "NC" 0 1 0 0 "Yes" 3 1 1 1 11 "Female" "NC" 1 0 1 0 "Yes" 3 1 1 1 11 "Female" "NC" 1 1 1 0 "Yes" 3 1 1 1 11 "Female" "NC" 1 0 0 0 "Yes" 3 1 1 1 11 "Female" "NC" 1 1 0 0 "No" 3 1 1 0 11 "Female" "NC" 0 0 0 0 "Yes" 3 1 1 1 11 "Female" "NC" 1 0 0 0 "Yes" 3 1 1 1 11 "Female" "NC" 0 0 1 0 "Yes" 3 1 1 1 11 "Female" "NC" 1 0 1 0 "No" 3 1 1 0 11 "Female" "NC" 1 0 0 1 "Yes" 3 1 1 1 11 "Female" "NC" 1 0 1 0 "Yes" 3 1 1 1 11 "Female" "NC" 0 0 1 0 "Yes" 3 1 1 1 11 "Female" "NC" 1 0 0 0 "Yes" 3 1 1 1 11 "Female" "NC" 0 0 0 0 "Yes" 3 1 1 1 11 "Female" "NC" 0 1 0 1 "No" 3 1 1 0 11 "Female" "NC" 1 0 0 0 "Yes" 3 1 1 1 11 "Female" "NC" 1 0 0 0 "Yes" 3 1 1 1 11 "Female" "NC" 0 1 0 0 "Yes" 3 1 1 1 12 "Female" "NC" 0 1 0 1 "Yes" 3 1 1 1 12 "Female" "NC" 0 1 0 1 "No" 3 1 1 0 12 "Female" "NC" 0 1 0 1 "No" 3 1 1 0 12 "Female" "NC" 0 1 1 0 "Yes" 3 1 1 1 12 "Female" "NC" 1 0 1 1 "Yes" 3 1 1 1 12 "Female" "NC" 0 0 0 0 "Yes" 3 1 1 1 12 "Female" "NC" 0 1 1 0 "No" 3 1 1 0 12 "Female" "NC" 0 0 1 0 "Yes" 3 1 1 1 12 "Female" "NC" 0 0 1 1 "Yes" 3 1 1 1 12 "Female" "NC" 0 1 1 0 "Yes" 3 1 1 1 12 "Female" "NC" 0 0 0 0 "Yes" 3 1 1 1 12 "Female" "NC" 1 1 1 0 "No" 3 1 1 0 12 "Female" "NC" 1 0 0 0 "No" 3 1 1 0 12 "Female" "NC" 1 0 1 0 "No" 3 1 1 0 12 "Female" "NC" 0 0 0 0 "No" 3 1 1 0 12 "Female" "NC" 0 0 0 1 "No" 3 1 1 0 12 "Female" "NC" 1 0 1 0 "Yes" 3 1 1 1 12 "Female" "NC" 0 0 0 0 "No" 3 1 1 0 13 "Female" "NC" 1 1 1 1 "No" 3 1 1 0 13 "Female" "NC" 0 1 1 1 "No" 3 1 1 0 13 "Female" "NC" 0 0 0 0 "Yes" 3 1 1 1 13 "Female" "NC" 0 0 1 1 "No" 3 1 1 0 13 "Female" "NC" 0 0 1 0 "No" 3 1 1 0 13 "Female" "NC" 0 0 1 0 "NO DATA" 3 1 1 -1 13 "Female" "NC" 1 0 1 0 "No" 3 1 1 0 13 "Female" "NC" 0 1 1 0 "No" 3 1 1 0 13 "Female" "NC" 1 1 1 1 "Yes" 3 1 1 1 13 "Female" "NC" 0 0 0 0 "No" 3 1 1 0 13 "Female" "NC" 0 1 1 1 "No" 3 1 1 0 13 "Female" "NC" 0 0 1 0 "No" 3 1 1 0 13 "Female" "NC" 0 0 1 0 "No" 3 1 1 0 13 "Female" "NC" 0 0 0 1 "Yes" 3 1 1 1 13 "Female" "NC" 0 1 1 1 "No" 3 1 1 0 13 "Female" "NC" 0 0 1 1 "No" 3 1 1 0 13 "Female" "NC" 0 0 1 0 "NO DATA" 3 1 1 -1 13 "Female" "NC" 0 0 1 0 "Yes" 3 1 1 1 13 "Female" "NC" 0 1 1 0 "No" 3 1 1 0 13 "Female" "NC" 0 0 1 1 "No" 3 1 1 0 13 "Female" "NC" 0 1 1 0 "No" 3 1 1 0 13 "Female" "NC" 0 0 1 0 "No" 3 1 1 0 13 "Female" "NC" 0 1 1 0 "No" 3 1 1 0 13 "Female" "NC" 0 1 1 1 "No" 3 1 1 0 13 "Female" "NC" 0 0 0 0 "Yes" 3 1 1 1 13 "Female" "NC" 0 1 1 0 "No" 3 1 1 0 13 "Female" "NC" 0 1 1 1 "No" 3 1 1 0 13 "Female" "NC" 0 0 1 0 "No" 3 1 1 0 14 "Female" "NC" 0 0 1 0 "No" 4 1 1 0 14 "Female" "NC" 0 0 0 0 "No" 4 1 1 0 14 "Female" "NC" 1 0 0 0 "No" 4 1 1 0 14 "Female" "NC" 0 1 0 1 "No" 4 1 1 0 14 "Female" "NC" 0 0 1 0 "No" 4 1 1 0 14 "Female" "NC" 0 1 0 0 "Yes" 4 1 1 1 14 "Female" "NC" 0 1 1 1 "Yes" 4 1 1 1 14 "Female" "NC" 0 1 0 0 "No" 4 1 1 0 14 "Female" "NC" 0 0 1 0 "No" 4 1 1 0 14 "Female" "NC" 0 0 0 0 "No" 4 1 1 0 14 "Female" "NC" 0 0 1 0 "No" 4 1 1 0 14 "Female" "NC" 0 1 1 1 "No" 4 1 1 0 14 "Female" "NC" 0 1 1 1 "NO DATA" 4 1 1 -1 14 "Female" "NC" 1 1 1 1 "No" 4 1 1 0 14 "Female" "NC" 0 1 1 1 "No" 4 1 1 0 14 "Female" "NC" 0 1 0 1 "No" 4 1 1 0 end
0 Response to Multinomial logistic regression
Post a Comment