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.
|