2 To what degree do the dietary & exercise habits of a sample of adults predict whether they are in the low, medium, or high-risk categories for cardiovascular disease?How well do the social traits of a sample of high school students predict whether their achievement test scores are low, medium-low, medium-high, or high?
3 To what extent do the institutional characteristics of a sample of political regimes predict whether their responsiveness to citizen demands is low, medium, or high?How helpful are the institutional characteristics of a sample of industrial firms in predicting whether the amount of pollution they emit is low, medium, or high?
4 These are examples of ordinal outcome variables. The categories of an ordinal variable can be ranked, but the distances between the categories are not equal.Because the distances between the categories are not equal, analyzing ordinal outcome variables via OLS regression violates its assumptions & leads to erroneous conclusions.What statistical model avoids the assumption of equal intervals between ordinal categories?
5 Logit & probit versions of the ordinal regression model safely ignore the OLS assumption of equal intervals between a variable’s categories.But as Long & Freese (pages ) observe, “Simply because the values of a variable can be ordered does not imply that the variable should be analyzed as ordinal.”A categorical, multi-level variable could conceivably be ordered for one purpose but unordered for another.
6 As Long & Freese conclude, “Overall, when the proper ordering is ambiguous, the models for nominal outcomes [multinomial regression] …should be considered.”Multinomial models treat categories as nominal rather than ordinal: Which do you prefer—apple pie, hot fudge sundae, cheese cake, or cannoli?Which is your racial-ethnic identity: Black, White, Asian, Hispanic, or other?
7 Let’s use ordinal logistic regression to analyze respondent answers to this statement: “A working mother can establish just as warm & secure of a relationship with her child as a mother who does not work.”The responses are coded as: 1=strongly disagree (SD), 2=disagree (D), 3=agree (A), & 4=strongly agree (SA).These data are examined in Long/Freese, chapter 5.. use ordwarm2, clear
8 Let’s assume we’ve done the preparatory data analysis & transformations. . ologit warm yr89 male white age ed prst, or nolog table
9 . ologit warm yr89 male white age ed prst, or nolog table Ordered logit estimates Number of obs = 2293LR chi2(6) =Prob > chi2 =Log likelihood = Pseudo R2 =warm | Odds Ratio Std. Err z P>|z| [95% Conf. Interval]yr89 |male |white |age |ed |prst |
10 What’s the interpretation? Let’s see the coefficients as percentage change in odds:. listcoef, percentologit (N=2293): Percentage Change in OddsOdds of: >m vs <=mwarm b z P>z % %StdX SDofXyrmalewhiteageedprst
11 Try fitting the model by means of ordinal probit: . oprobit warm yr89 male white age ed prst, nolog tableOf course we can’t obtain odds ratios via ordinal probit.Otherwise the only notable difference is that the logit coefficients are 1.7 times greater than the probit coefficients: the substantive conclusions are basically the same.
12 We could have used the robust &/or cluster options: .ologit warm yr89 male white age ed prst, or robust nolog table.ologit warm yr89 male white age ed prst, or cluster(district) nolog table.oprobit warm yr89 male white age ed prst, robust nolog table.oprobit warm yr89 male white age ed prst, cluster(district) nolog tableRecall that cluster invokes robust standard errors.
13 One possible problem with ologit or oprobit is perfect prediction: if the outcome variable does not vary within one of the categories of the explanatory variable, Stata will tell you. E.g.:. note: 40 observations completely determined. Standard errors questionable.We may receive the same message with binary outcome variables, but in that case Stata tells us which is the variable at fault & automatically drops the offending observations.
14 In the case of logistic regression (i. e In the case of logistic regression (i.e. a binary outcome variable),we may decide it wise to drop the offending variable from the model & re-estimate the model.In ordinal categorical regression, we cross-tab the explanatory variables with the outcome variable to identify the culprit.Then we re-categorize or drop the offending variable or—if we deem it wise—drop only the observations at fault (see Long/Freese, page 145).
15 Let’s return to our ologit model & test nested models: . ologit warm yr89 male white age ed prst, or nolog table. estimates store full. ologit warm yr89 male white age, nolog. lrtest full .likelihood-ratio test LR chi2(2) =(Assumption: . nested in full) Prob > chi2 =
16 We can also use the Wald-test to do the same thing (although, as mentioned previously, the likelihood ratio test is the preferred alternative):. test ed prst( 1) ed = 0( 2) prst = 0chi2( 2) =Prob > chi2 =The Wald-test & likelihood ratio test yield the same conclusion (as they usually do).
17 . linktest, nolog Next step: test the model specification: Ordered logit estimates Number of obs = 2293LR chi2(2) =Prob > chi2 =Log likelihood = Pseudo R =warm Coef. Std. Err z P>z [95% Conf. Interval]_hat_hatsq_cut (Ancillary parameters)_cut_cutNo problems here.
18 An aspect of model specification testing for ologit & oprobit models concerns the proportional odds (or, parallel regression) assumption: similar to OLS, the assumption is that the slope coefficients are identical across levels of the outcome variable—each probability curve is assumed to differ only in being shifted to the left or right (see Long/Freese, pages ).There are two ways of testing this assumption:. omodel logit warm yrs89 male white age ed prst. ologit warm yrs89 male white age ed prst. brant
19 . omodel logit warm yrs89 male white age ed prst Ordered logit estimates Number of obs = 2293LR chi2(6) =Prob > chi2 =Log likelihood = Pseudo R =warm Coef. Std. Err. z P>z [95% Conf. Interval]yrmalewhiteageedprst_cut (Ancillary parameters)_cut_cutApproximate likelihood-ratio test of proportionality of oddsacross response categories: chi2(12) = Prob > chi2 =
20 . brantBrant Test of Parallel Regression AssumptionVariable chi2 p>chi2 dfAllyrmalewhiteageedprstA significant test statistic provides evidence that the parallelregression assumption has been violated.Both tests say that the model violates the parallel odds (or regression) assumption.
21 What should we do in response to this model violation? Most basically, recall the difference between statistical & practical significance.We need to explore changes to the explanatory variables or alternatives that safely ignore the parallel odds assumption: e.g., generalized ordered logit (gologit2, which is downloadable); or else multinomial logit (mlogit).Then compare the results across the kinds of models: Are there practically significant differences? If not, perhaps stick with the ologit model.
22 One more thing: Brant test is more likely to yield significant results as samples get larger.
23 . gologit2 warm yr89 male white age ed prst, auto . findit gologit2. view help gologit. gologit2 warm yr89 male white age ed prst, auto. linktestConclusion: gologit2 works fine, but the relative ease & clarity of interpreting ologit vs. gologit2 must be considered.On gologit2 & its various options, see:gologit2 (generalized ordered ologit):
24 There are no diagnostics for gologit2 beyond linktest. So let’s return to the ologit model to find out how its diagnostics work.
25 . ologit warm yr89 male white age ed prst, or nolog table .predict pSD pD pA pSA if e(sample).su pSD-pSAVariable Obs Mean Std. Dev. Min MaxpSDpDpApSA
27 The rest of the diagnostics for ologit or oprobit are mere approximations of diagnostics for the overall model based on sequentially re-estimating the model in higher-versus-lower binary segments: in this example, category D(2) versus SD(1), category A(3) versus D(2), & category SD(4) versus A(3).This is extremely tedious & time consuming.Here, nonetheless, is how to do it.
28 We must first recode the outcome variable so that the base value=0. We must use not ologit but rather logit regression.And using logit regression, we estimate an ordinal series of binary outcome variables: e.g., 0/1, 1/2, & 2/3.
29 . recode warm 1=0 2=1 3=2 4=3. logit warm yr89 male white age ed prst if warm~=2 & warm~=3, nolog. predict p1 if e(sample) [note: p1=pD in original coding]. predict db, db. predict dd, dd. predict dx2, dx2. predict n, n. su p1-nThen plot the graphs & proceed as discussed under logistic regression.
30 . drop db-n. logit warm yr89 male white age ed prst if warm~=0 & warm~=1, nolog. predict p2 if e(sample). predict db, db. predict dd, dd. predict dx2, dx2. predict n, n. su p2-nAgain, plot the graphs & proceed as discussed under logistic regression.
31 . drop db-n. ologit warm yr89 male white age ed prst if warm~=1 & warm~=2, nolog. predict p3 if e(sample). predict db, db. predict dd, dd. predict dx2, dx2. predict n, n. su p3-nContinue plotting graphs & proceed as discussed under logistic regression.
32 At best, though, they represent approximations. Such diagnostics can alert us to problems of model fit, outliers & influence.At best, though, they represent approximations.At this point we typically would explore predicted probabilities (postgr3, prchange, prtab, prvalue, & prgen-graphs).We’ll look only at postgr3, specifying a separate graph for outcomes 2, 3 & 4.
33 . xi3:ologit warm yr89 male white age ed prst, or nolog table . postgr3 age, by(male) outcome(2) tableFemale: top line.
34 . postgr3 age, by(male) outcome(3) table Female: top line.
35 . postgr3 age, by(male) outcome(4) table Female: top line.
36 There are other ordered logit models, such as ordered continuation-ratio (ocratio), which predicts likelihoods of reaching higher versus lower categories that require passing through the lower categories to reach the higher ones.E.g., earning a Ph.D. versus an M.A. versus a B.A. versus a high school degree versus less than a high school degree.
37 But let’s turn our attention to the multinomial logit model.
38 An outcome is nominal when the categories are assumed to be unordered. Marital status: divorced, never married, married, or widowed.Occupation: professional, white collar, blue collar, craft, or menial.Race-ethnicity, religion, political affiliation, and citizenship are among the other examples of nominal variables.
39 We use a multinomial logit model to compare nominal outcomes, or when the assumption of parallel regressions (i.e. parallel odds) is violated.Among the other versions is the conditional logit model (see Long/Freese, chapter 6), which uses the characteristics of the outcomes to predict which choice is made (e.g., your voting options are George Bush Sr., George Bush Jr., or Jeb Bush: which would you choose given the array of choices?)
40 Multinomial logit models include a lot of parameters, & interpreting the results can be overwhelming.Advice: keep the categories of the outcome variable to the fewest number possible.The STATA-based approaches developed by Long & Freese (chapter 6) are helpful in grappling with the complexities.Here’s an example:. u nomocc2, clear
41 We’ll pretend that we’ve done the background exploratory analysis & transformations. The research question: how effective are the variables white, ed & exper in predicting whether a sample of respondents work in menial jobs, blue collar jobs, craft jobs, white collar jobs, or professional jobs?. mlogit occ white ed exper, rrr base(5) nolog
42 . mlogit occ white ed exper, rrr base(5) nolog Multinomial logistic regression Number of obs =LR chi2(12) =Prob > chi2 =Log likelihood = Pseudo R =
44 Craft |white |ed |exper |WhiteCol |white |ed |exper |(Outcome occ==Prof is the comparison group)rrr (relative risk ratio): mlogit’s relative risk ratio coefficients are an approximation of the real thing; see Statalist on this.The default is to display logit coefficients; ‘outreg,’ ‘estimates,’ & other table commands can display odds ratios.
45 . listcoef, factor help Or: . listcoef, percent help If you feel more comfortable using odds ratios or percentage change in odds:. quietly mlogit occ white ed exper, base(5). listcoef, factor helpOr:. qui mlogit occ white ed exper, base(5). listcoef, percent help
46 We can change the comparison group via base( ), or not specify base( ) & let Stata choose the comparison group.
47 We can display the results in terms of odds ratios or percentage change in odds either for all the explanatory variables together or for them individually:. listcoef, factor help. listcoef white, factor help. listcoef, percent help. listcoef white, percent helpAnd to simplify the output, we can display only those explanatory variables that attain a specified level of statistical significance:. listcoef white, pvalue(.10)
48 Recall that cluster invokes robust standard errors. And we could have specified the robust &/or cluster options in the multinomial equation.Recall that cluster invokes robust standard errors.
49 The problem of perfect prediction: mlogit does not give us a warning message, but rather lists the culprit variables as z=0 (and p>|z|=1).What to do: re-estimate the model, excluding the problem variable & deleting the observations that imply perfect prediction.Identify the problem observations by doing a cross-tab of the problem variable with the outcome variable.
50 Model specification & related tests: linktest is not an option for mlogit, but Long & Freese have developed mlogtest to greatly facilitate the battery of tests for a multinomial logit model.. mlogtest, lr wald lrcom sm setThese & other options can be specified either individually or collectively.
51 **** Likelihood-ratio tests for independent variables Ho: All coefficients associated with given variable(s) are 0.occ chi2 df P>chi2whiteedexper**** Wald tests for independent variablesocc chi2 df P>chi2whiteedexper
52 **** Small-Hsiao tests of IIA assumption Ho: Odds(Outcome-J vs Outcome-K) are independent of other alternatives.Omitted lnL(full) lnL(omit) chi df P>chi2 evidenceMenial against HoBlueCol against HoCraft against HoWhiteCol against Ho
53 **** LR tests for combining outcome categories Ho: All coefficients except intercepts associated with given pairof outcomes are 0 (i.e., categories can be collapsed).Categories tested chi df P>chi2Menial- BlueColMenial- CraftMenial-WhiteColMenial- ProfBlueCol- CraftBlueCol-WhiteColBlueCol- ProfCraft-WhiteColCraft- ProfWhiteCol- Prof
54 How to test for the joint significance of, say, ‘ethnicity’ (with ‘white’ as the base category)? We can do so using either a likelihood ratio test (which is preferred) or a Wald test:. mlogtest, lr set(black hispanic asian). mlogtest, wald set(black hispanic asian)These tests of joint significance can be specified together with the other mlogtest options.
55 Other Fit & Influence Diagnostics . mlogit occ white ed exper, base(5) nolog. predict prM prB prC prW prP if e(sample). su prM-prPNote: M, B, C, W & P are labels attached to the coded responses 1, 2, 3, 4 & 5.
56 As for the influence-diagnostic graphs, which are mere approximations as diagnostic tools: Re-code the outcome variable so that the reference group=0.Use not mlogit but rather logit to estimate the model for each binary outcomeEstimate the logit model for (at least) each outcome-level versus the base-level (e.g., menial vs. professional, craft versus professional, white collar vs. professional).
57 How to explore predicted probabilities How to explore predicted probabilities? Returing to the original coding of ‘occ’:. mlogit occ white ed exper, base(5) nologThen use postgr3, prchange, prtab, prvalue & prgen to predict & graph probabilities.We could also use prchange & mlogview to graph the predictions in another format.
58 . xi3: mlogit occ white ed exper, base(5) nolog . postgr3 ed, by(white) outcome(1) tableNonwhite: top line.
59 . postgr3 ed, by(white) outcome(2) table Nonwhite: top line.
62 See their particular commands for mlogit. Predicted probabilities: Long & Freese’s suite of commands (e.g., prvalue, x(…) delta save; prvalue, x(…) delta diff) is relevant.See their particular commands for mlogit.Remember to see Long & Freese’s final chapter to learn how to predict probabilities based on curvilinear explanatory variables.
63 Finally, consider regression models for another, common form of categorical outcome variable: counts (see Long/Freese, chapter 7).E.g., the number of homicides, suicides, hospitalizations, accidents, alcoholic drinks consumed, academic publications, or wars.OLS regression is commonly but inappropriately applied to such problems.Instead use count models such as poisson & negative binomial regression.That’s all!
Your consent to our cookies if you continue to use this website.