logistic regression [message #12044] |
Wed, 22 March 2017 13:37 |
chichi
Messages: 9 Registered: March 2017
|
Member |
|
|
Hello, I am working with Namibian DHS 2013. I want to make a logistic regression and produce Odds ratios. My two variables are "education level" (v106) and " comprehensive knowledge" (comp knowledge_score5). (The data is weighted) I tried the following code:
svy: logistic compknowledge_score5 i.v106 if gender == "women"
Is that code right?
As you can see in my output "no education" is not listed. If my syntax is correct, how can I interpret my output?
I am happy, if someone can help me!
|
|
|
Re: logistic regression [message #12135 is a reply to message #12044] |
Fri, 31 March 2017 11:22 |
Bridgette-DHS
Messages: 3230 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Stata Specialist, Tom Pullum:
When you do a logit (=logistic) regression, Stata expects the dependent or outcome variable to be coded 0 or 1. I don't know quite what your outcome variable looks like, but I don't think it is coded 0 or 1. I think that in your example, Stata has consolidated all values greater than 0 into the "1" category.
Education category 0, which is the lowest numbered code for v106, is the default "reference category" in Stata. The odds ratio for that category is 1. I wish Stata included that category in the output, and gave it a coefficient of 1 and a standard error of 0, to help users with the interpretation. Odds ratios for the other categories are relative to the reference category. That is, whatever your Y is, the odds of Y=1 vs Y=0 is the constant term, .5033758, for cases with v106=0. The odds of Y=1 vs Y=0 is .5033758 times 1.633612, for cases with v106=1. The odds of Y=1 vs Y=0 is .5033758 times 4.190808, for cases with v106=2, etc. Odds ratios (=relative odds) are the odds of Y=1 vs Y=0 in a specific category relative to the odds in the reference category.
However, the main problem here is not with the interpretation but that you can only do a logit regression with a 0/1 outcome.
|
|
|