Stata
Products Purchase Support Company
Search
   >> Home >> Resources & support >> FAQs >> Interpreting “outcome-does-not-vary” message when running logistic

Why do I get the message “outcome does not vary” when I perform a logistic or logit regression?

Title   Interpreting “outcome does not vary” message when running logistic
Author Paul Lin, StataCorp
Date November 1996

Answer

You probably have a dependent variable that is coded 1 and 2 for the two outcomes

        1       meaning the event did not occur
        2       meaning the event did occur

Stata wants the coding

        0       meaning the event did not occur
        1       meaning the event did occur

All you have to do to fix the problem is

        . replace dep_var = dep_var - 1

Details

The coding

        0       meaning the event did not occur
        1       meaning the event did occur

is just an example of the type of coding Stata requires. Stata actually assumes the dependent variable is of the form

         0      meaning the event did not occur
      nonzero   meaning the event did occur 

and draws no distinction between the nonzero numbers. Thus, if you had a dependent variable that recorded the number of times an event occurred and you now wanted to analyze simply whether the event occured 1 or more times, you could use that count variable as a dependent variable with logistic, logit, or probit.

FAQs
What's new?
Statistics
Data management
Graphics
Programming Stata
Mata
Resources
Internet capabilities
Stata for Windows
Stata for Unix
Stata for Macintosh
Technical support
Resources & support
FAQs
Technical support
NetCourses
Short courses
Users Group meetings
Statalist
Links
Software updates
Software archives
Customer service
Manuals & supplements
Stata Journal
STB
Stata News
Stata Automation
Plugins

Site overview
Products
Resources & support
Company
Site index

© Copyright 1996–2008 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index