Hello.
Suppose that I have a set of data where I want to know the association between Sex and Social Media Disorder (SMD). My codebook for Sex and SMD is this way:
and my epidemiology, 2x2 table looks like this one:
The odds ratio should be: Female/Male= 1.112, right? (manually calculated), meaning that the odds for female to have SMD is 1.112 times higher than male
However, when I try to use logistic regression under this command, I found that something is not right
where RECODE_KATSMD is my variable for SMD
which yields the result as below:
Which is a little bit confusing because I use male as a references, but the odds ratio for female is 0.898 (different than the one I calculated manually from the epidemiology table)
I try to do:
it returns:
meaning that the odds for women= 2.2, and men= 2.447 and when i calculate odds ratio female/male= 2.22/2.44737 is 0.898, which is also different from the OR we calculated manually before
I am now confused and feeling dumb.
Thank you very much
Suppose that I have a set of data where I want to know the association between Sex and Social Media Disorder (SMD). My codebook for Sex and SMD is this way:
Coding | Variable |
0 | Female |
1 | Male |
0 | SMD |
1 | Not SMD |
Sex | SMD | NOT SMD |
Female | 90 | 198 |
Male | 38 | 93 |
However, when I try to use logistic regression under this command, I found that something is not right
Code:
logistic RECODE_KATSMD ib1.SEX
which yields the result as below:
Code:
logistic RECODE_KATSMD ib1.SEX Logistic regression Number of obs = 419 LR chi2(1) = 0.21 Prob > chi2 = 0.6432 Log likelihood = -257.7637 Pseudo R2 = 0.0004 RECODE_KATSMD Odds Ratio Std. Err. z P>z [95% Conf. Interval] SEX Perempuan .8989249 .2073968 -0.46 0.644 .5719225 1.412894 _cons 2.447368 .471196 4.65 0.000 1.678093 3.569296 Note: _cons estimates baseline odds.
I try to do:
Code:
adjust, by(SEX) exp
Code:
SEX exp(xb) Female 2.2 Male 2.44737 Key: exp(xb) = exp(xb)
I am now confused and feeling dumb.
Thank you very much
Comment