statalogis

# statalogis - Logistic Regression in Stata Here's a...

This preview shows pages 1–3. Sign up to view the full content.

1 Logistic Regression in Stata * Here's a description of how to do logistic regression, as well as ordinal & multinomial logit regression, in Stata. The examples use the UCLA-ATS data set hsb2.dta . For logistic regression, for the outcome variable use the dummy variable hsci (science achievement score>60); if necessary create it yourself. For ordinal logistic regression you’ll create the outcome variable sci3 , as described later on. For the multinomial logistic example we'll use race as the outcome variable. We'll begin with logistic regression, then we’ll do brief examples of ordinal & multinomial logit. Rick Tardanico, March 2008. * See ‘Explanatory variables in logistic regression.doc’ * Open & examine the univariate characteristics the data set u hsb2, clear d su hist read, norm [e.g.] gr box read [e.g.] tab ses [e.g.] * The dependent variable is hsci (science achievement score>=60). Graphically & numerically examine the pertinent univariate, bivariate & (insofar as possible) multivariate distributions, consider possible transformations or other manipulations, & perhaps save a new data set consisting of listwise (i.e. ‘complete’) observations (using the commands ‘mark’ and ‘markout’ [see Long/Freese]). * Select the explanatory variables * The procedure we'll use, as outlined in Hosmer & Lemeshow, preliminarily selects independent indvariables based on, first, substantive & theoretical relevance, and second, on pvalues<=.25 (which the procedure later modifies in view of more complete sets of variables and the modelling of nonlinearities). Begin by testing the potential explanatory variables with the dependent variable in 'mini' logit & logistic models. * Note: 'logit' yields the logit coefficient, while 'logistic' yields odds ratios. Specifying the option 'or' after logit makes logit display odds ratios. The Stata manual emphasizes that the only distinction between 'logit' & 'logistic' is logit coefficients versus odds ratios. The conclusions reached by the two approaches are identical. ci hsci, binomial [options: agresti, jeffreys, wilson] scatlog hsci math, ci [download ‘scatlog’] logit hsci math, or nolog estimates store full logit hsci, or lrtest full

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 * Do the preceding graph & the tests--for each potential explanatory variable, & document the results for later reference. Regarding the tests, those variables that obtain pvalues<=.25 will be included in the 'preliminary main-effects model'. Let's suppose that we've done so. The following is our preliminary model, which we'll test for significance. If our sample is unweighted we can use the likelihood ratio test to assess nested models. If the sample is weighted we use Wald tests (i.e. Stata's 'test' command in logit/logistic regression). But first, run all of the preliminary variables in an OLS regression in order to run a multicollinearity test (see Menard on the justification for doing so).
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern